[MPlayer-dev-eng] [PATCH] Yet another batch of warning fixes :->

Arpi arpi at thot.banki.hu
Tue Dec 10 12:53:52 CET 2002


Hi,

> > > > > > -    while(in < end) *in=(*in++)>>1;
> > > > > > +    while(in < end) { *in=(*in)>>1; in++; }
> > > > > 
> > > > > again, why?
> > > > 
> > > > Same deal.
> > > 
> > > yes, but the fix is wrong.
> > > it should be (IMHO!) *(++in)=(*in)>>1; or *(in+1)=*in>>1;++in;
> > > 
> > > IMHO the order that gcc (and other compilers) use is calculating the
> > > rightvalue first, then storing the result in the left value.
> > 
> > use:
> > while(in < end) { *in=(*in)>>1; in++;}
> 
> And that's exactly what I proposed.

what about  *in++>>=1;  ? ;)
c rulz


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu



More information about the MPlayer-dev-eng mailing list