[FFmpeg-devel] [RFC]lavu/opt: Use && instead of * in boolean expression

Carl Eugen Hoyos ceffmpeg at gmail.com
Fri May 5 10:26:05 EEST 2017


2017-05-05 3:12 GMT+02:00 Aaron Levinson <alevinsn at aracnet.com>:
> On 5/4/2017 4:32 PM, Carl Eugen Hoyos wrote:
>> Hi!
>>
>> It may be better to disable the warning.
>>
>> Carl Eugen
>>
>> -        num = den ? num * intnum / den : (num * intnum ? INFINITY : NAN);
>> +        num = den ? num * intnum / den : (num && intnum ? INFINITY : NAN);
>
> In order to preserve the original logic, why not do the following:
>
> +        num = den ? num * intnum / den : (((num * intnum) != 0) ? INFINITY : NAN);

Simpler patch attached.

Carl Eugen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-configure-Silence-a-less-useful-warning.patch
Type: text/x-patch
Size: 748 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170505/8da58893/attachment.bin>


More information about the ffmpeg-devel mailing list