[Ffmpeg-devel] [PATCH] Reduce number of warnings in snow.c
Thu Jan 25 13:00:50 CET 2007
On Thu, 2007-01-25 at 00:15 +0100, Michael Niedermayer wrote:
> On Wed, Jan 24, 2007 at 03:10:32PM +0100, Panagiotis Issaris wrote:
> > Hi,
> > The attached patch brings the number of warnings from 33 to 16 by:
> > - explicitly using braces in some cases, namely when GCC suggests:
> > * suggest parentheses around + or - inside shift
> > * suggest parentheses around && within ||
> not ok, feel free to silence them with a command line argument if theres
> one which doesnt silence anything important
The "-Wno-parentheses" flag silences GCC about this one.
>From the GCC manual:
"Warn if parentheses are omitted in certain contexts, such as when there
is an assignment in a context where a truth value is expected, or when
operators are nested whose precedence people often get confused about.
Only the warning for an assignment used as a truth value is supported
when compiling C++; the other warnings are only supported when compiling
Also warn if a comparison like `x<=y<=z' appears; this is equivalent to
`(x<=y ? 1 : 0) <= z', which is a different interpretation from that of
ordinary mathematical notation.
Also warn about constructions where there may be confusion to which if
statement an else branch belongs.
Rest can be found here:
> > - using the const keyword ("initialization discards qualifiers from
> > pointer target type")
Applied all okay-ed parts.
With friendly regards,
Public key: http://www.issaris.org/pi.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
More information about the ffmpeg-devel