[FFmpeg-devel] [PATCH 5/5] all: fix enum definition for large values

Michael Niedermayer michael at niedermayer.cc
Sat Oct 24 20:33:18 CEST 2015


On Sat, Oct 24, 2015 at 09:29:23AM -0400, Ganesh Ajjanagadde wrote:
> ISO C restricts enumerator values to the range of int. Thus (for instance) 0x80000000
> unfortunately does not work, and throws a warning with -Wpedantic on
> clang 3.7.
> 
> This fixes such errors by explicitly casting as an int, doing the
> desired unsigned to signed conversion. This method works on all current
> architectures. Tested with FATE.
> 
> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>

Simply changing the values to signed is not correct / not sufficient
the code assumes that they are unsigned

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many things microsoft did are stupid, but not doing something just because
microsoft did it is even more stupid. If everything ms did were stupid they
would be bankrupt already.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151024/2af261a3/attachment.sig>


More information about the ffmpeg-devel mailing list