[Ffmpeg-cvslog] CVS: ffmpeg/libavutil common.h,1.153,1.154

Michel Bardiaux mbardiaux
Mon Dec 12 17:02:19 CET 2005


Alexander Strasser (beastd) wrote:
> Update of /cvsroot/ffmpeg/ffmpeg/libavutil
> In directory mail:/var2/tmp/cvs-serv2042/libavutil
> 
> Modified Files:
> 	common.h 
> Log Message:
> Fixed format specifier in STOP_TIMER macro.

This causes lots of warnings on mingw (gcc version 3.2 (mingw special 
20020817-1)):

gcc -O3 -g -Wall -Wno-switch  -DHAVE_AV_CONFIG_H -I.. 
-I'//pktbes02/dsk3/people/michel/internet/ffmpeg-mingw-tutorial'/libavutil 
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE   -c -o vp3.o 
vp3.c
vp3.c: In function `apply_loop_filter':
vp3.c:2103: warning: unsigned int format, different type arg (arg 4)
vp3.c: In function `vp3_decode_frame':
vp3.c:2513: warning: unsigned int format, different type arg (arg 4)
vp3.c:2533: warning: unsigned int format, different type arg (arg 4)
vp3.c:2539: warning: unsigned int format, different type arg (arg 4)
vp3.c:2545: warning: unsigned int format, different type arg (arg 4)
vp3.c:2551: warning: unsigned int format, different type arg (arg 4)
vp3.c:2561: warning: unsigned int format, different type arg (arg 4)
vp3.c:2566: warning: unsigned int format, different type arg (arg 4)
vp3.c:2570: warning: unsigned int format, different type arg (arg 4)

Doing a 'gcc -E' shows that PRIu64 is replaced by "I64u". The full 
expansion of STOP_TIMER is:

tend= read_time();{ static uint64_t tsum=0; static int tcount=0; static 
int tskip_count=0; if(tcount<2 || tend - tstart < 8*tsum/tcount){ tsum+= 
tend - tstart; tcount++; }else tskip_count++; 
if(256*256*256*64%(tcount+tskip_count)==0){ av_log(((void *)0), 2, 
"%""I64u"" dezicycles in %s, %d runs, %d skips\n", tsum*10/tcount, "loop 
filter", tcount, tskip_count); }}

Even casting tsum*10/tcount explicitly to (uint64_t) fails to remove the 
warning. Any idea on how to fix this? (Of course, maybe I just have to 
upgrade my msys, but I hate doing that unless unavoidable, esp. after 
all the noise about asm bugs in very recent gcc's)

> 
> 
> Index: common.h
> ===================================================================
> RCS file: /cvsroot/ffmpeg/ffmpeg/libavutil/common.h,v
> retrieving revision 1.153
> retrieving revision 1.154
> diff -u -d -r1.153 -r1.154
> --- common.h	19 Sep 2005 23:26:47 -0000	1.153
> +++ common.h	1 Dec 2005 18:20:15 -0000	1.154
> @@ -512,7 +512,7 @@
>    }else\
>        tskip_count++;\
>    if(256*256*256*64%(tcount+tskip_count)==0){\
> -      av_log(NULL, AV_LOG_DEBUG, "%Ld dezicycles in %s, %d runs, %d skips\n", tsum*10/tcount, id, tcount, tskip_count);\
> +      av_log(NULL, AV_LOG_DEBUG, "%"PRIu64" dezicycles in %s, %d runs, %d skips\n", tsum*10/tcount, id, tcount, tskip_count);\
>    }\
>  }
>  #else
> 
> _______________________________________________
> ffmpeg-cvslog mailing list
> ffmpeg-cvslog at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/ffmpeg-cvslog


-- 
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/





More information about the ffmpeg-cvslog mailing list