[FFmpeg-devel] [PATCH] libavdevice/v4l2.c: av_log DEBUG cast

Luca Abeni lucabe72
Tue Feb 10 16:14:18 CET 2009


Patrik Kullman wrote:
> (long unsigned int) standard.id in av_log debug message
> Prevents warning about wrong type in formatting.

which kind of warning are you seeing?
According to the documentation, id should be a __u64, so
the code looks correct. The cast you propose is actually
causing a warning here:
gcc -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I. -I"/home/luca/src/Video/ffmpeg" -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -std=c99 -fomit-frame-pointer -g 
-Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -O3 
-fno-math-errno -fno-signed-zeros       -c -o libavdevice/v4l2.o libavdevice/v4l2.c
libavdevice/v4l2.c: In function ?v4l2_set_parameters?:
libavdevice/v4l2.c:498: warning: format ?%llu? expects type ?long long unsigned int?, but argument 5 has type ?long unsigned int?

Without the patch, I see no warning.
I'll investigate this stuff this evening on a 64bit machine.


More information about the ffmpeg-devel mailing list