[FFmpeg-devel] [PATCH] Remove two warnings during libavformat build

Måns Rullgård mans
Fri May 2 20:05:11 CEST 2008


Michael Niedermayer <michaelni at gmx.at> writes:

> %On Fri, May 02, 2008 at 05:41:58PM +0200, Diego 'Flameeyes' Petten? wrote:
>> 
>> Trivial patch, on 64-bit architectures, int and long int have different
>> sizes, and the difference between pointer (ptrdiff_t) is usually mapped
>> on long int. At any rate, %ld should cover all architectures whatever
>> their pointer size, afaict.
>
> Which part of the C spec gurantees that a ptrdiff_t is the same as a long?

None.  The only requirement is that ptrdiff_t must be able to
represent values in the range -65535 to 65535.  Thus, on a machine
with 9-bit bytes, ptrdiff_t could legally be 18 bits, while long is
required to be wider.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list