[Ffmpeg-devel] Possible use of uninitialized variable

Panagiotis Issaris takis.issaris
Thu Jan 25 16:23:41 CET 2007


Hi,

On Thu, 2007-01-25 at 00:23 +0100, Michael Niedermayer wrote:
> Hi
> 
> 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"
> warning
> 
> it makes spotting real uninitalized variables easier (better signal to noise
> ratio in gccs warnings)
Applied.

With friendly regards,
Takis

-- 
vCard: http://www.issaris.org/pi.vcf
Public key: http://www.issaris.org/pi.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070125/709bbf2f/attachment-0001.pgp>



More information about the ffmpeg-devel mailing list