Bug 130201

Summary: local variable used before set
Product: [openSUSE] SUSE LINUX 10.0 Reporter: David Binderman <dcb314>
Component: DevelopmentAssignee: Philipp Thomas <pth>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Enhancement    
Priority: P5 - None    
Version: Final   
Target Milestone: ---   
Hardware: All   
OS: SuSE Linux 10.0   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

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.