[MPlayer-dev-eng] [PATCH] Compiler warnings almost gone :)
Dominik Mierzejewski
dominik at rangers.eu.org
Fri Jan 10 12:04:03 CET 2003
On Friday, 10 January 2003, D Richard Felker III wrote:
> On Fri, Jan 10, 2003 at 11:41:23AM +0100, Dominik Mierzejewski wrote:
> > On Friday, 10 January 2003, Alex Beregszaszi wrote:
> > > Hi,
[...]
> > > I think it should be (1<<31)-1 instead your version ( (1<<(31-1)) ).
> >
> > Maybe so, but according to C standard - has higher priority than <<, so
> > it was executed in that order anyway. I don't pretend to understand
> > this code, so I don't know what is the right solution here.
>
> If that's true, then congradulations, you found a real bug. 1<<(31-1)
> is nonsense, you'd just write 1<<30. It's obviously supposed to be
> (1<<31)-1, i.e. the largest 32bit signed integer.
Let me check again... Yup, everywhere I check they say binary - has higher
precedence than shift (<<).
> pl_*.c is obsolete anyway though.
Ah, ok.
--
MPlayer RPMs maintainer: http://www.piorunek.pl/~dominik/linux/pkgs/mplayer/
"The Universe doesn't give you any points for doing things that are easy."
-- Sheridan to Garibaldi in Babylon 5:"The Geometry of Shadows"
More information about the MPlayer-dev-eng
mailing list