[FFmpeg-devel] uint32_t arg and %X conversion specifier

Marc Mason mpeg.blue
Thu Jan 15 15:15:22 CET 2009


Hello,

I see two ways to fix the following (very minor) warning.

avidec.c:428: warning: format '%X' expects type 'unsigned int', but 
argument 4 has type 'uint32_t'

1) cast the arg to unsigned long
http://home.att.net/~jackklein/c/inttypes.html#long
drawback : on platforms where long are 64-bits wide, this will push 4 
useless ( == 0 ) octets

2) use the appropriate macro for the conversion specifier
http://www.opengroup.org/onlinepubs/9699919799/basedefs/inttypes.h.html
drawback : C99 specific ??

-- 
Regards.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: avidec-cast-to-unsigned-long.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090115/10143a09/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: avidec-PRI-macro.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090115/10143a09/attachment.asc>



More information about the ffmpeg-devel mailing list