[MPlayer-dev-eng] [PATCH] a couple of warning fixes in qt decoder and encoder

Dominik Mierzejewski dominik at rangers.eu.org
Mon Dec 16 16:10:28 CET 2002


On Monday, 16 December 2002, Arpi wrote:
> Hi,
> 
> > Nothing major this time, just a few trivial fixes to silence some warnings.
> 
> i left these out by reason.
> 
> > -    printf("Found it! ID = 0x%X\n",prev);
> > +    printf("Found it! ID = %p\n",prev);
> 
> prev isn't a pointer but a 6-digit component id.

Hmm... I'll have to recheck it then.

> > -    printf("ImageCodecInitialize->%p  size=%d (%d)\n",cres,i
> > cap.recordSize,icap.decompressRecordSize);
> > +    printf("ImageCodecInitialize->%#lx  size=%d (%d)\n",cres
> 
> wtf is %#lx ? how portable is it?

It's equivalent to 0x%lx.

PRINTF(3)           Linux Programmer's Manual           PRINTF(3)
[...]
       o,u,x,X
              The unsigned int argument is converted to  unsigned
              octal  (o),  unsigned decimal (u), or unsigned hex-
              adecimal (x and X) notation.   The  letters  abcdef
              are  used for x conversions; the letters ABCDEF are
              used for X conversions.
[...]

'l' is just for 'long'. '#' adds 0x at the beginning:
[...]
       #      The  value  should  be  converted to an ``alternate
              form''. [...] For x and X conversions,
              a  non-zero result has the string `0x' (or `0X' for
              X conversions) prepended to it.  For a, A, e, E, f,
[...]

-- 
MPlayer RPMs maintainer: http://www.piorunek.pl/~dominik/linux/pkgs/mplayer/
"The Universe doesn't give you any points for doing things that are easy."
        -- Sheridan to Garibaldi in Babylon 5:"The Geometry of Shadows"



More information about the MPlayer-dev-eng mailing list