[FFmpeg-devel] [PATCH] Warning fix: use intptr_t for integer pointer math

Alexander Strange astrange
Sat May 9 01:53:21 CEST 2009


On May 8, 2009, at 4:02 PM, Diego Biurrun wrote:

> On Wed, May 06, 2009 at 04:24:59PM -0500, Daniel Verkamp wrote:
>> Not tested, but presumably this was not correct on x86-64...
>
> 'make test' passes with your patch applied.

make test doesn't test h264 decoding, but if anything with CABAC still  
decodes after the patch it works.

But all the asm instructions using these are explicitly 32-bit, so the  
patch has no effect except a bit larger stack size anyway. Does just  
using (intptr_t) casts instead of (int) fix the warning?

>> libavcodec/x86/h264_i386.h: In function 'decode_significance_x86':
>> libavcodec/x86/h264_i386.h:41: warning: cast from pointer to  
>> integer of
>> different size
>> libavcodec/x86/h264_i386.h:42: warning: cast from pointer to  
>> integer of
>> different size
>> libavcodec/x86/h264_i386.h: In function  
>> 'decode_significance_8x8_x86':
>> libavcodec/x86/h264_i386.h:94: warning: cast from pointer to  
>> integer of
>> different size
>
> I don't get those warnings with gcc 4.1.2, what version do you use?
>
> Diego
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel




More information about the ffmpeg-devel mailing list