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

Daniel Verkamp daniel
Sat May 9 02:38:11 CEST 2009


On Fri, May 8, 2009 at 3:02 PM, Diego Biurrun <diego at biurrun.de> wrote:
> On Wed, May 06, 2009 at 04:24:59PM -0500, Daniel Verkamp wrote:
[...]
>> 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?
>

Gentoo-patched gcc 4.3.3 (Gentoo 4.3.3-r2 p1.1, pie-10.1.5), amd64.

On Fri, May 8, 2009 at 6:53 PM, Alexander Strange <astrange at ithinksw.com> wrote:
> But all the asm instructions using these are explicitly 32-bit, so the patch
> has no effect except a bit larger stack size anyway.

I thought this was odd too, but it's being compiled on my x86-64 machine...

> Does just using (intptr_t) casts instead of (int) fix the warning?

Yes.

Thanks,
-- Daniel Verkamp



More information about the ffmpeg-devel mailing list