[FFmpeg-devel] [RFC/PATCH]lavc/v4l2_context: Change the type of the ioctl cmd to unsigned long
Carl Eugen Hoyos
ceffmpeg at gmail.com
Sun Nov 5 20:27:26 EET 2017
2017-11-05 2:46 GMT+01:00 Mark Thompson <sw at jkqxz.net>:
> On 05/11/17 00:46, Carl Eugen Hoyos wrote:
>> Hi!
>>
>> Attached patch fixes a warning on a current 64bit Linux system (that I
>> do not see on my ancient system where the ioctl cmd has type int).
>> Is there a better way to deal with it?
>
>> Fixes a warning on recent Linux:
>> libavcodec/v4l2_context.c: In function 'ff_v4l2_context_set_status':
>> libavcodec/v4l2_context.c:496:26: warning: comparison is always false due to limited range of data type
>
> Huh. I didn't realise that the standard Linux ioctl numbering actually
> acts differently on different achitectures (you don't hit this on ARM
> or x86-64 with a write-only ioctl, as VIDIOC_STREAMON is).
>
> The patch is probably correct, though I think I would prefer the type
> to be uint32_t
Pushed with that change.
Thank you, Carl Eugen
More information about the ffmpeg-devel
mailing list