[Ffmpeg-devel] [PATCH] Reduce number of warnings in snow.c

Panagiotis Issaris takis.issaris
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
> ok
> >   * 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")
> ok
> [...]
Applied all okay-ed parts.

With friendly regards,

vCard: http://www.issaris.org/pi.vcf
Public key: http://www.issaris.org/pi.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070125/f5d8cc84/attachment.pgp>

More information about the ffmpeg-devel mailing list