Summary: Fix numerous warnings in codycam (merge from fixes branch)

Keywords:

Patches applied:

 * n.reedijk@planet.nl--nielx-2003/codycam--fixes--0.1--base-0
   tag of n.reedijk@planet.nl--openbeos-2004/codycam--mainline--0.1--base-0

 * n.reedijk@planet.nl--nielx-2003/codycam--fixes--0.1--patch-1
   Fix numerous warnings in codycam


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5556 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Niels Sascha Reedijk 2003-12-03 19:57:59 +00:00
parent 3a8fae2fb7
commit 859c1f0198
3 changed files with 20 additions and 28 deletions

View File

@ -93,9 +93,6 @@ void
CodyCam::ReadyToRun()
{
/* create the window for the app */
uint32 x = WINDOW_SIZE_X;
uint32 y = WINDOW_SIZE_Y;
fWindow = new VideoWindow(BRect(28, 28, 28 + (WINDOW_SIZE_X-1), 28 + (WINDOW_SIZE_Y-1)),
(const char *)"CodyCam", B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE, &fPort);
@ -127,8 +124,6 @@ CodyCam::QuitRequested()
void
CodyCam::MessageReceived(BMessage *message)
{
status_t status;
switch (message->what)
{
case msg_start:
@ -368,7 +363,7 @@ static void
ErrorAlert(const char * message, status_t err)
{
char msg[256];
sprintf(msg, "%s\n%s [%x]", message, strerror(err), err);
sprintf(msg, "%s\n%s [%lx]", message, strerror(err), err);
(new BAlert("", msg, "Quit"))->Go();
be_app->PostMessage(B_QUIT_REQUESTED);
}
@ -424,9 +419,9 @@ AddTranslationItems( BMenu * intoMenu, uint32 from_type)
VideoWindow::VideoWindow (BRect frame, const char *title, window_type type, uint32 flags, port_id * consumerport) :
BWindow(frame,title,type,flags),
fPortPtr(consumerport),
fView(NULL),
fVideoView(NULL),
fPortPtr(consumerport)
fVideoView(NULL)
{
fFtpInfo.port = 0;
fFtpInfo.rate = 0x7fffffff;
@ -519,7 +514,6 @@ void
VideoWindow::MessageReceived(BMessage *message)
{
BControl *p;
uint32 index;
p = NULL;
message->FindPointer((const char *)"source",(void **)&p);
@ -868,7 +862,6 @@ void
ControlWindow::MessageReceived(BMessage * message)
{
BParameterWeb * web = NULL;
BView * panel = NULL;
status_t err;
switch (message->what)

View File

@ -44,7 +44,7 @@ bool FtpClient::ls(string &listing)
{
bool rc = false;
string cmd, replystr;
int code, codetype, i, numread;
int code, codetype, numread;
char buf[513];
cmd = "TYPE A";
@ -453,7 +453,7 @@ bool FtpClient::p_sendRequest(const string &cmd)
if(m_control != 0)
{
if(cmd.find("PASS") != -1)
if(cmd.find("PASS") != string::npos)
printf("PASS <suppressed> (real password sent)\n");
else
printf("%s\n", ccmd.c_str());
@ -607,7 +607,6 @@ bool FtpClient::p_openDataConnection()
unsigned short port;
BNetAddress addr;
int i, code, codetype;
char buf[32];
bool rc = false;
struct sockaddr_in sa;

View File

@ -43,21 +43,21 @@ VideoConsumer::VideoConsumer(
BMediaNode(name),
BMediaEventLooper(),
BBufferConsumer(B_MEDIA_RAW_VIDEO),
mView(view),
mWindow(NULL),
mStatusLine(statusLine),
mInternalID(internal_id),
mAddOn(addon),
mTimeToFtp(false),
mFtpComplete(true),
mRate(1000000),
mImageFormat(0),
mTranslator(0),
mPassiveFtp(true),
mConnectionActive(false),
mMyLatency(20000),
mWindow(NULL),
mView(view),
mOurBuffers(false),
mBuffers(NULL),
mOurBuffers(false)
mTimeToFtp(false),
mFtpComplete(true),
mRate(1000000),
mImageFormat(0),
mTranslator(0),
mPassiveFtp(true)
{
FUNCTION("VideoConsumer::VideoConsumer\n");
@ -85,7 +85,6 @@ VideoConsumer::VideoConsumer(
VideoConsumer::~VideoConsumer()
{
FUNCTION("VideoConsumer::~VideoConsumer\n");
status_t status;
Quit();
@ -196,6 +195,9 @@ VideoConsumer::RequestCompleted(const media_request_info & info)
ERROR("VideoConsumer::RequestCompleted: Not using our buffers!\n");
}
break;
default:
ERROR("VideoConsumer::RequestCompleted: Invalid argument\n");
break;
}
return B_OK;
}
@ -240,7 +242,7 @@ VideoConsumer::HandleMessage(int32 message, const void * data, size_t size)
void
VideoConsumer::BufferReceived(BBuffer * buffer)
{
LOOP("VideoConsumer::Buffer #%d received\n", buffer->ID());
LOOP("VideoConsumer::Buffer #%ld received\n", buffer->ID());
if (RunState() == B_STOPPED)
{
@ -284,7 +286,6 @@ VideoConsumer::CreateBuffers(
// create a buffer group
uint32 mXSize = with_format.u.raw_video.display.line_width;
uint32 mYSize = with_format.u.raw_video.display.line_count;
uint32 mRowBytes = with_format.u.raw_video.display.bytes_per_row;
color_space mColorspace = with_format.u.raw_video.display.format;
PROGRESS("VideoConsumer::CreateBuffers - Colorspace = %d\n", mColorspace);
@ -317,7 +318,7 @@ VideoConsumer::CreateBuffers(
}
else
{
ERROR("VideoConsumer::CreateBuffers - ERROR CREATING VIDEO RING BUFFER: %08x\n", status);
ERROR("VideoConsumer::CreateBuffers - ERROR CREATING VIDEO RING BUFFER: %08lx\n", status);
return B_ERROR;
}
}
@ -330,7 +331,7 @@ VideoConsumer::CreateBuffers(
if (buffList[j] != NULL)
{
mBufferMap[j] = (uint32) buffList[j];
PROGRESS(" j = %d buffer = %08x\n", j, mBufferMap[j]);
PROGRESS(" j = %d buffer = %08lx\n", j, mBufferMap[j]);
}
else
{
@ -350,7 +351,6 @@ void
VideoConsumer::DeleteBuffers()
{
FUNCTION("VideoConsumer::DeleteBuffers\n");
status_t status;
if (mBuffers)
{