[FFmpeg-devel] [PATCH] Fix some warnings in nut.c
Michael Niedermayer
michaelni
Sun Nov 4 18:05:48 CET 2007
On Sun, Nov 04, 2007 at 02:35:41PM +0100, Diego Biurrun wrote:
> On Sun, Nov 04, 2007 at 02:27:05PM +0100, Michael Niedermayer wrote:
> > On Sun, Nov 04, 2007 at 02:10:18PM +0100, Diego Biurrun wrote:
> > > OK to apply the attached patch for
> > >
> > > nut.c: In function ?ff_nut_sp_pos_cmp?:
> > > nut.c:43: warning: suggest parentheses around + or - inside shift
> > > nut.c:43: warning: suggest parentheses around + or - inside shift
> > > nut.c: In function ?ff_nut_sp_pts_cmp?:
> > > nut.c:47: warning: suggest parentheses around + or - inside shift
> > > nut.c:47: warning: suggest parentheses around + or - inside shift
> > >
> > > ?
> >
> > darn no! ive rejected this at least once already
> > this is no warning fix it is just _WRONG_ the code just doesnt
> > work anymore after this patch!
>
> Ouch, yes, I had the operator precedence of shifts and +/- backwards.
> Here is a better patch...
patch ok, except
[...]
> - return (a->ts - b->ts>>32) - (b->ts - a->ts>>32);
> + return ((a->ts - b->ts) >>32) - ((b->ts - a->ts) >> 32);
^ ^
i cant belive it, your whitespace is inconsistant
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071104/2b8b9de8/attachment.pgp>
More information about the ffmpeg-devel
mailing list