[FFmpeg-cvslog] r20521 - trunk/libavcodec/alsdec.c

Michael Niedermayer michaelni
Thu Nov 12 22:34:34 CET 2009


On Thu, Nov 12, 2009 at 02:05:13AM +0000, M?ns Rullg?rd wrote:
> Alex Converse <alex.converse at gmail.com> writes:
> 
> > 2009/11/11 M?ns Rullg?rd <mans at mansr.com>:
> >> alexc <subversion at mplayerhq.hu> writes:
> >>
> >>> Author: alexc
> >>> Date: Thu Nov 12 02:44:38 2009
> >>> New Revision: 20521
> >>>
> >>> Log:
> >>> Fix a __warn_memset_zero_len gcc-4.4 warning.
> >>>
> >>> Modified:
> >>> ? ?trunk/libavcodec/alsdec.c
> >>>
> >>> Modified: trunk/libavcodec/alsdec.c
> >>> ==============================================================================
> >>> --- trunk/libavcodec/alsdec.c Thu Nov 12 01:07:36 2009 ? ? ? ?(r20520)
> >>> +++ trunk/libavcodec/alsdec.c Thu Nov 12 02:44:38 2009 ? ? ? ?(r20521)
> >>> @@ -670,6 +670,7 @@ static void zero_remaining(unsigned int
> >>> ? ? ?while (b < b_max)
> >>> ? ? ? ? ?count += div_blocks[b];
> >>>
> >>> + ? ?if (count)
> >>> ? ? ?memset(buf, 0, sizeof(*buf) * count);
> >>> ?}
> >>
> >> That warning is stupid IMHO. ?What's next? ?Why don't they just add
> >> -Weverything and print something like this:
> >>
> >> file.c:1: warning: there might be an error here
> >> file.c:2: warning: there might be an error here
> >> ...
> >>
> >
> > I agree it's a stupid warning but not only does it spam on a huge
> > number of lines on the source file compilation it also spams on every
> > link. Last time it came up we added a similar check.
> 

> We can turn off the warning.  For lunacies like this, that's
> preferable to bloating the code, making it slower and harder to read.

i agree

also if the if stays, please someone at least add a comment explaining why
its there.

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

The worst form of inequality is to try to make unequal things equal.
-- 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-cvslog/attachments/20091112/2fc62e67/attachment-0001.pgp>



More information about the ffmpeg-cvslog mailing list