[FFmpeg-devel] [PATCH] fix check in dyn_buf_write that gcc 4.3 optimizes away

Michael Niedermayer michaelni
Sat Oct 4 22:52:59 CEST 2008


On Sat, Oct 04, 2008 at 10:02:35PM +0200, Reimar D?ffinger wrote:
> Hello,
> On Sat, Oct 04, 2008 at 08:39:55PM +0200, Michael Niedermayer wrote:
> > On Sat, Oct 04, 2008 at 06:17:09PM +0200, Reimar D?ffinger wrote:
> > > newest gcc when optimizing comparisons assumes that no overflows happen,
> > > breaking this way of checking.
> > > Attached patch fixes it - I hope it to be uncontroversial since we
> > > already avoided relying on this kind of check in several other
> > > places.
> > 
> > id just make te var unsigned ...
> 
> Ok, like this?

ok


>  Btw. with function also has a weird "return -1234;" that
> looks a lot like nonsense to me...

well, it looks like nonsense to me too :)

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- Aristotle
-------------- 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/20081004/1603a870/attachment.pgp>



More information about the ffmpeg-devel mailing list