[MPlayer-dev-eng] [PATCH] trivial warning fixes

Rich Felker dalias at aerifal.cx
Fri Aug 5 23:11:58 CEST 2005


On Fri, Aug 05, 2005 at 08:22:14PM +0300, Oded Shimon wrote:
> On Sat, Jul 30, 2005 at 11:55:06AM +0300, Shachar Raindel wrote:
> > On 7/30/05, Sycotic Smith <sycotic at linuxmail.org> wrote:
> > > << warningfix2.diff >>
> > > << warningfix5.diff >>
> > > 
> > > In regards to these patches, shouldn't the fix be to change the "%.4s" to "%.4d" instead? Isn't it proper to look for an int if you want to use an int? Call me old-fashoined, but this is how I would be doing it in my text-based muds if I were getting that error...
> > > 
> > > If I'm not understanding this correctly, just send this message to /dev/null.
> > > 
> > > i.e.:
> > > -       mp_msg(MSGT_DEMUX,MSGL_DBG2,"lschunks %.4s  %d\n",&id,(int)len);
> > > +       mp_msg(MSGT_DEMUX,MSGL_DBG2,"lschunks %.4s  %d\n",(char*)&id,(int)len);
> > > 
> > > would instead be
> > > +       mp_msg(MSGT_DEMUX,MSGL_DBG2,"lschunks %.4d  %d\n",&id,(int)len);
> > > 
> > > /S. Smith
> > > PS. Yes, I do not know as much about c as many of you, but IMHO if you want one thing, it's easier to look for that type than typecast something else to it...
> > > 
> > 
> > Which of the following is more readable as a representation for FOURCC:
> > XVID or 1145656920 (which can also be 1482049860, if you are running
> > on big-endian machine)?
> 
> If you are running a big-endian machine, won't printf print 'DIVX' instead 
> of 'XVID'?.. (which would actually be kind of funny :) This code's behavior 
> is undefined...

Are you sure? I thought it had already been byteswapped..

Rich




More information about the MPlayer-dev-eng mailing list