Bug 130201 - local variable used before set
Summary: local variable used before set
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Development (show other bugs)
Version: Final
Hardware: All SuSE Linux 10.0
: P5 - None : Enhancement
Target Milestone: ---
Assignee: Philipp Thomas
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-23 19:11 UTC by David Binderman
Modified: 2005-11-16 18:36 UTC (History)
0 users

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2005-10-23 19:11:15 UTC
I just tried to compile package fwnn-1.1.1a017-546 with the GNU C compiler 

It said

jikouho_d.c:660: warning: "sone" is used uninitialized in this function

The source code is

	sbn_set (dbn, &d_sbn, sone, dbn->sbn);

Suggest initialise local variable "sone" before first use.
Comment 1 Karl Eichwalder 2005-11-16 09:49:28 UTC
wrong component.
Comment 2 Philipp Thomas 2005-11-16 18:36:28 UTC
This is a false warning. sone (a pointer) only passed on to other functions and
really set before being used (see sbn_set and sons_set later on in the same file.
But it doesn't harm to set it, even when it's useless, so I've included it with
other code cleanups for future versions of SUSE Linux.