[FFmpeg-cvslog] r11815 - trunk/libavformat/asf.c

Michael Niedermayer michaelni
Sat Feb 2 23:36:29 CET 2008


On Sat, Feb 02, 2008 at 04:53:26PM -0500, Ronald S. Bultje wrote:
> On Feb 2, 2008 4:46 PM, Rich Felker <dalias at aerifal.cx> wrote:
> 
> > On Sat, Feb 02, 2008 at 10:25:35PM +0100, Michael Niedermayer wrote:
> > > On Sat, Feb 02, 2008 at 10:17:46PM +0100, reimar wrote:
> > > > Author: reimar
> > > > Date: Sat Feb  2 22:17:46 2008
> > > > New Revision: 11815
> > > >
> > > > Log:
> > > > Put is_mms under ifdef CONFIG_MMSH_PROTOCOL, avoids warning:
> > > > libavformat/asf.c:112: warning: 'is_mms' defined but not used
> > >
> > > Iam not too much in favor of these kind of warning fixes ...
> >
> > Agree. cost(#ifdef) >> cost(warning) (and here >> means greater by an
> > order of magnitude, not rightshift).
> 
> 
> Disagree.
> 
> As said before, these sort of warnings are easily fixed, do not obfuscate
> actual code (unlike your previously pointed out casts), they do not make
> code slower and do not affect binary size (unless your compiler sucks, in
> which case it makes it smaller :-) ). So far for the disadvantages.
> 
> Advantage as always: these silly warnings make it harder to spot those few
> helpful messages from gcc (that svq1 bug is just one of the many; compiling
> with -Wall -Werror would have made sure that never went in, because it
> relies on a const -> non-const cast). 

Ive added -Wcast-qual just a day or 2 ago, so no -Werror would not have
stopped the svq1 bug.
And the #ifdef makes the code much more obfuscated. A unused function never
points to a bug except by coincidence. It might point to some forgotten old
code but not more. Theres attribute(unused) for silencing such warnings.

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many things microsoft did are stupid, but not doing something just because
microsoft did it is even more stupid. If everything ms did were stupid they
would be bankrupt already.
-------------- 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-cvslog/attachments/20080202/c7ec2538/attachment.pgp>



More information about the ffmpeg-cvslog mailing list