On 02/13/2012 09:07 AM, Diego Biurrun wrote:
> On Mon, Feb 13, 2012 at 08:18:09AM -0500, Justin Ruggles wrote:
>> On 02/13/2012 04:15 AM, Diego Biurrun wrote:
>>> --- a/libavcodec/ac3enc.c
>>> +++ b/libavcodec/ac3enc.c
>>> @@ -1386,8 +1386,7 @@ static void ac3_output_frame_header(AC3EncodeContext
>>> *s)
>>> static void output_audio_block(AC3EncodeContext *s, int blk)
>>> {
>>> - int ch, i, baie, bnd, got_cpl;
>>> - int av_uninit(ch0);
>>> + int ch, i, baie, bnd, got_cpl, ch0;
>>> AC3Block *block = &s->blocks[blk];
>>>
>>> @@ -2236,8 +2235,7 @@ static av_cold int validate_options(AC3EncodeContext
>>> *s)
>>> static av_cold void set_bandwidth(AC3EncodeContext *s)
>>> {
>>> - int blk, ch;
>>> - int av_uninit(cpl_start);
>>> + int blk, ch, cpl_start;
>>>
>>> --- a/libavcodec/ac3enc_template.c
>>> +++ b/libavcodec/ac3enc_template.c
>>> @@ -335,7 +335,7 @@ static void
>>> compute_rematrixing_strategy(AC3EncodeContext *s)
>>> int nb_coefs;
>>> int blk, bnd, i;
>>> - AC3Block *block, *av_uninit(block0);
>>> + AC3Block *block, *block0;
>>
>> I'm not against removing these, but I want to point out that removing
>> them causes (invalid) gcc warnings when making seemingly unrelated
>> changes to the code. I did this in the first place to cut out the
>> unnecessary noise, but if people really want these removed, that's fine.
>> I've been told clang gives warnings when we use av_uninit() when it
>> otherwise would not.
>
> What warnings do you get? I don't get any new warnings after removing
> these attributes.
They may not be there currently, but when I was actively working on the
code, making unrelated changes would sometimes trigger the "may be used
uninitialized" warning.
-Justin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel