Bug 140092

Summary: xstereograph-2.1-575: local variable used before set
Product: [openSUSE] SUSE LINUX 10.0 Reporter: David Binderman <dcb314>
Component: BasesystemAssignee: Michal Marek <mmarek>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Minor    
Priority: P5 - None    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: SUSE Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description David Binderman 2005-12-18 08:13:30 UTC
I just tried to compile package xstereograph-2.1-575 with a GNU C compiler

It said

xstereograph.c:1084: warning: "data" is used uninitialized in this function

The source code is

   wid_main[++n] = MakeButton("Config ", Config, data);

I have read the source code, and I agree with the compiler.
Suggest code rework.
Comment 1 Michal Marek 2006-01-03 13:28:43 UTC
Config is a callback function and data is its argument, which Config doesn't
make use of, so this warning is harmless. But to silence the warning, I
replaced all the unused 'data' arguments with NULL (I can attach the patch if
you want).

Thanks for both your reports!