[FFmpeg-devel] [PATCH]configure: Add -Wno-char-subscripts

Carl Eugen Hoyos ceffmpeg at gmail.com
Mon Nov 19 02:56:01 EET 2018


2018-11-18 23:25 GMT+01:00, Tomas Härdin <tjoppen at acc.umu.se>:
> sön 2018-11-18 klockan 04:40 +0100 skrev Carl Eugen Hoyos:
>> Hi!
>>
>> On systems with signed char, the compiler cannot distinguish between
>> (intended) int8_t used as subscript and unintended char, therefore the
>> warning doesn't help.
>
> Is this done anywhere in the codebase currently?

Not sure I understand correctly:
I don't think there is a "char" used as subscript (or we would see the
warning on standard x86 Linux systems), I suspect the "uint8_t" we
often use as subscripts are translated into "unsigned char" and
never trigger the warning but - afaict from looking at the code and
the many warnings on sunos - wherever FFmpeg uses "int8_t" as
subscript (which happens often in the code and I assume it happens
intentionally) the warning shows because of a translation into "char"
on such a system where char is signed.

Carl Eugen


More information about the ffmpeg-devel mailing list