[Ffmpeg-devel] Possible use of uninitialized variable

Loren Merritt lorenm
Wed Jan 24 17:34:09 CET 2007

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.

--Loren Merritt

More information about the ffmpeg-devel mailing list