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

Michael Niedermayer michaelni
Thu Jan 25 01:19:21 CET 2007


Hi

On Wed, Jan 24, 2007 at 11:57:11PM +0000, M?ns Rullg?rd wrote:
> Diego Biurrun <diego at biurrun.de> writes:
> 
> > On Thu, Jan 25, 2007 at 12:15:39AM +0100, Michael Niedermayer wrote:
> >> 
> >> On Wed, Jan 24, 2007 at 03:10:32PM +0100, Panagiotis Issaris wrote:
> >> > 
> >> > The attached patch brings the number of warnings from 33 to 16 by:
> >> >   * suggest parentheses around && within ||
> >> 
> >> not ok
> >
> > Why?  Note that I don't mean to question this decision, I'm just
> > interested in the reasons.
> 
> Any fool knows that && has higher precedence than ||.  Adding
> parenthesis only makes the code harder to read.

exactly and my reasoning why its ok with + vs >> is that their
precedence is somewhat unintuitive, (my) intuition says << and >>
should have precedence similar to * and / as their operation is
similar now C does something else and iam sure theres a good justification
why ...

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070125/f39edbda/attachment.pgp>



More information about the ffmpeg-devel mailing list