[FFmpeg-cvslog] r23093 - trunk/libavfilter/vf_pad.c

Benjamin Larsson banan
Wed May 12 11:51:41 CEST 2010


Michael Niedermayer skrev 2010-05-12 11:30:
> On Wed, May 12, 2010 at 11:08:05AM +0200, Benoit Fouet wrote:
>    
>> Hi,
>>
>> On Tue, 11 May 2010 19:39:52 +0200 (CEST) bcoudurier wrote:
>>      
>>> Author: bcoudurier
>>> Date: Tue May 11 19:39:52 2010
>>> New Revision: 23093
>>>
>>> Log:
>>> silence gcc warning about potential uninitialized usage
>>>
>>> Modified:
>>>     trunk/libavfilter/vf_pad.c
>>>
>>> Modified: trunk/libavfilter/vf_pad.c
>>> ==============================================================================
>>> --- trunk/libavfilter/vf_pad.c	Tue May 11 19:25:18 2010	(r23092)
>>> +++ trunk/libavfilter/vf_pad.c	Tue May 11 19:39:52 2010	(r23093)
>>> @@ -100,7 +100,7 @@ static int config_input(AVFilterLink *in
>>>       PadContext *pad = ctx->priv;
>>>       const AVPixFmtDescriptor *pix_desc =&av_pix_fmt_descriptors[inlink->format];
>>>       uint8_t rgba_color[4];
>>> -    uint8_t rgba_map[4];
>>> +    uint8_t rgba_map[4] = {0};
>>>       int i, is_packed_rgb = 1;
>>>
>>>       switch (inlink->format) {
>>>        
>> Unless I'm mistaken, this warning was wrong.
>> Is there a policy on what we do in such cases ?
>>      
> policy is that speed critical code should not be slowed down by fixing
> a warning. This doesnt apply here so theres no policy for this specific
> case
> anyway, IMHO ideally false warnings should be fixed by adding attribute() or
> disabling the warning.
>
> [...]
>    

I prefer setting the variable to 0 instead of adding av_unused() or y=y 
or something else incomprehensible.

MvH
Benjamin Larsson




More information about the ffmpeg-cvslog mailing list