Re: Codycam Warning fixes

"Niels Reedijk" <n.reedijk-EIBgga6/0yRmR6Xm/[email protected]> Mon, 1 Dec 2003 06:13:46 +0100
Newsgroups gmane.os.openbeos.preferences
Message-ID <000701c3b7c9$e86b9520$0201a8c0@Kantoor>
Yes, do I get the green light?

Niels Sascha Reedijk


> -----Oorspronkelijk bericht-----
> Van: openbeos-preferences-bounce-uGLqWuYN4qMgsBAKwltoeQ@public.gmane.org [mailto:openbeos-
> [email protected]] Namens Sikosis
> Verzonden: zondag 30 november 2003 23:48
> Aan: [email protected]
> Onderwerp: [openbeos-preferences] Re: Codycam Warning fixes
>=20
> Do you have write access ?
>=20
> Cheers
>=20
> Sikosis
> OBOS Pref Team Leader
> http://obos.gravity24hr.com/
> http://openbeos.org/
>=20
>=20
> Quoting Niels Reedijk <n.reedijk-EIBgga6/0yRmR6Xm/[email protected]>:
>=20
> > Hi,
> >
> > I've fixed a whole number of warnings.
> >
> > patch-1
> >     Fix numerous warnings in codycam
> >
> > Can I merge these with the main cvs repository?
> >
> > Niels
> >
> >
> > --- orig/CodyCam.cpp
> > +++ mod/CodyCam.cpp
> > @@ -93,9 +93,6 @@
> >  CodyCam::ReadyToRun()
> >  {
> >         /* create the window for the app */
> > -       uint32 x =3D WINDOW_SIZE_X;
> > -       uint32 y =3D WINDOW_SIZE_Y;
> > -
> >         fWindow =3D new VideoWindow(BRect(28, 28, 28 + (WINDOW_SIZE_X=
-1),
> > 28 + (WINDOW_SIZE_Y-1)),
> >                                                                 (cons=
t
> > char *)"CodyCam", B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE, =
&
> > fPort);
> >
> > @@ -127,8 +124,6 @@
> >  void
> >  CodyCam::MessageReceived(BMessage *message)
> >  {
> > -       status_t status;
> > -
> >         switch (message->what)
> >         {
> >                 case msg_start:
> > @@ -368,7 +363,7 @@
> >  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 @@
> >
> >  VideoWindow::VideoWindow (BRect frame, const char *title, window_typ=
e
> > type, uint32 flags, port_id * consumerport) :
> >         BWindow(frame,title,type,flags),
> > +       fPortPtr(consumerport),
> >         fView(NULL),
> > -       fVideoView(NULL),
> > -       fPortPtr(consumerport)
> > +       fVideoView(NULL)
> >  {
> >         fFtpInfo.port =3D 0;
> >         fFtpInfo.rate =3D 0x7fffffff;
> > @@ -519,7 +514,6 @@
> >  VideoWindow::MessageReceived(BMessage *message)
> >  {
> >         BControl        *p;
> > -       uint32          index;
> >
> >         p =3D NULL;
> >         message->FindPointer((const char *)"source",(void **)&p);
> > @@ -868,7 +862,6 @@
> >  ControlWindow::MessageReceived(BMessage * message)
> >  {
> >         BParameterWeb * web =3D NULL;
> > -       BView * panel =3D NULL;
> >         status_t err;
> >
> >         switch (message->what)
> >
> > --- orig/FtpClient.cpp
> > +++ mod/FtpClient.cpp
> > @@ -44,7 +44,7 @@
> >  {
> >         bool rc =3D false;
> >         string cmd, replystr;
> > -       int code, codetype, i, numread;
> > +       int code, codetype, numread;
> >         char buf[513];
> >
> >         cmd =3D "TYPE A";
> > @@ -453,7 +453,7 @@
> >
> >         if(m_control !=3D 0)
> >         {
> > -               if(cmd.find("PASS") !=3D -1)
> > +               if(cmd.find("PASS") !=3D string::npos)
> >                         printf("PASS <suppressed>  (real password sen=
t)
> > \n");
> >                 else
> >                         printf("%s\n", ccmd.c_str());
> > @@ -607,7 +607,6 @@
> >         unsigned short port;
> >         BNetAddress addr;
> >         int i, code, codetype;
> > -       char buf[32];
> >         bool rc =3D false;
> >         struct sockaddr_in sa;
> >
> > --- orig/VideoConsumer.cpp
> > +++ mod/VideoConsumer.cpp
> > @@ -43,21 +43,21 @@
> >         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()
> >  {
> >         FUNCTION("VideoConsumer::~VideoConsumer\n");
> > -       status_t status;
> >
> >         Quit();
> >
> > @@ -196,6 +195,9 @@
> >
> > ERROR("VideoConsumer::RequestCompleted: Not using our buffers!\n");
> >                         }
> >                         break;
> > +               default:
> > +                       ERROR("VideoConsumer::RequestCompleted: Inval=
id
> > argument\n");
> > +                       break;
> >         }
> >         return B_OK;
> >  }
> > @@ -240,7 +242,7 @@
> >  void
> >  VideoConsumer::BufferReceived(BBuffer * buffer)
> >  {
> > -       LOOP("VideoConsumer::Buffer #%d received\n", buffer->ID());
> > +       LOOP("VideoConsumer::Buffer #%ld received\n", buffer->ID());
> >
> >         if (RunState() =3D=3D B_STOPPED)
> >         {
> > @@ -284,7 +286,6 @@
> >         // create a buffer group
> >         uint32 mXSize =3D with_format.u.raw_video.display.line_width;
> >         uint32 mYSize =3D with_format.u.raw_video.display.line_count;
> > -       uint32 mRowBytes =3D
> > with_format.u.raw_video.display.bytes_per_row;
> >         color_space mColorspace =3D
> > with_format.u.raw_video.display.format;
> >         PROGRESS("VideoConsumer::CreateBuffers - Colorspace =3D %d\n"=
,
> > mColorspace);
> >
> > @@ -317,7 +318,7 @@
> >                 }
> >                 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 @@
> >                         if (buffList[j] !=3D NULL)
> >                         {
> >                                 mBufferMap[j] =3D (uint32) buffList[j=
];
> > -                               PROGRESS(" j =3D %d buffer =3D %08x\n=
", j,
> > mBufferMap[j]);
> > +                               PROGRESS(" j =3D %d buffer =3D %08lx\=
n", j,
> > mBufferMap[j]);
> >                         }
> >                         else
> >                         {
> > @@ -350,7 +351,6 @@
> >  VideoConsumer::DeleteBuffers()
> >  {
> >         FUNCTION("VideoConsumer::DeleteBuffers\n");
> > -       status_t status;
> >
> >         if (mBuffers)
> >         {
> >
>=20
>=20
>=20