[Ffmpeg-devel] Possible use of uninitialized variable
Thu Jan 25 16:23:41 CET 2007
On Thu, 2007-01-25 at 00:23 +0100, Michael Niedermayer wrote:
> On Wed, Jan 24, 2007 at 09:34:09AM -0700, Loren Merritt wrote:
> > On Wed, 24 Jan 2007, Panagiotis Issaris wrote:
> > >GCC complains that the "line" variable defined on line 3550 snow.c
> > >could be used without having been initialized.
> > >
> > >At first sight this appears to be the case, when start_y == 0. Line will
> > >not be assigned on line 3554 but its uninitialized value will be
> > >assigned to prev, which gets dereferenced in each of the possible
> > >outcomes of the if's which follow (if end_y>1). Is end_y always <=1 if
> > >start_y == 0?
> > All uses of prev are inside if(y).
> > Yes, prev might be assigned an undefined value, but it won't be used in
> > that iteration.
> yes, but iam not against something like
> ... line=0; //silence silly "could be used without having been initialized"
> it makes spotting real uninitalized variables easier (better signal to noise
> ratio in gccs warnings)
With friendly regards,
Public key: http://www.issaris.org/pi.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
More information about the ffmpeg-devel