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

Måns Rullgård mans
Thu Nov 12 23:49:42 CET 2009


Michael Niedermayer <michaelni at gmx.at> writes:

> 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.

So what's the name of the warning we need to disable?

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-cvslog mailing list