[FFmpeg-devel] [PATCH] Fix warnings in bidir_refine (in libavcodec/motion_est.c)
Måns Rullgård
mans
Sat Jul 3 19:02:29 CEST 2010
Michael Niedermayer <michaelni at gmx.at> writes:
> On Sat, Jul 03, 2010 at 08:27:50AM -0700, Eli Friedman wrote:
>> On Sat, Jul 3, 2010 at 3:09 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
>> > no, the threshold is 0 for gcc warning spam workarounds
>>
>> Noted.
>>
>> > besides which command line option disables this warning?
>>
>> -Wno-overflow is the option; are you considering using it?
>
> for some of my projects unrelated to ffmpeg, yes.
> for ffmpeg its the decission of all devels and we first would need to
> know what we loose and gain with it.
The warning is useful for protecting against accidentally using a too
narrow type (or equivalently assigning too large values). It gets
annoying only when the assigned value fits in the number of bits of
the target type, but with a change of sign, i.e. assigning a huge
positive number to signed type or a negative number to an unsigned
type. Those cases can usually be solved by adding a 'u' suffix to the
integer constant.
The warnings this thread is about are of the rare variety which cannot
be so easily silenced without adding clutter or having the actual code
change.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list