[Ffmpeg-devel] [PATCH] Fix some compiler warnings

Michael Niedermayer michaelni
Sat Jun 24 11:53:18 CEST 2006


Hi

On Sat, Jun 24, 2006 at 09:09:12AM +0200, Pieter Hollants wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> The attached patch fixes some compiler warnings in the current SVN code.
> 
> The typecasts should be pretty self-explainatory, 

yes you cast const to non const to hide warnings, this is unacceptable
warnings can be hidden with compiler flags or the code can be fixed by 
marking things which are const as such


> for the byte shifting
> operations I added the module operator, which makes sure the apparantly
> desired shift results are reached without exceeding the variable's width.

wtf?! RTF 5lines of code you changed, the code is perfectly fine for 
FRAC_BITS from 0 to 8, and above 8 it will not work, your change might
hide one of 2 warnings a FRAC_BITS of 9 should generate but it doesnt even
partly fix the code in that case
and FRAC_BITS is #defied to 8 


> 
> And yes, I know that's code that probably needs a rewrite anyway, 

no, the code is mostly fine, sure it can be cleaned up though but a
rewrite is certainly not appropriate

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list