[Bug 207872] New: xstereograph-2.1-595: local variable used before set
https://bugzilla.novell.com/show_bug.cgi?id=207872 Summary: xstereograph-2.1-595: local variable used before set Product: openSUSE 10.2 Version: Alpha 4 plus Platform: All OS/Version: SuSE Linux 10.1 Status: NEW Severity: Normal Priority: P5 - None Component: X11 Applications AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: dcb314@hotmail.com QAContact: sndirsch@novell.com I just tried to compile package xstereograph-2.1-595 with the Intel C compiler. The compiler said gfxio.c(829): warning #592: variable "a" is used before its value is set The source code is int z; float *a, *datafield[5]; for(z = 0; (z < 5) && (a || !z); z++) Suggest initialise local variable "a" before first use. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=207872 aj@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team- |anosek@novell.com |screening@forge.provo.novell| |.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=207872 mmarek@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mmarek@novell.com Status|NEW |RESOLVED Resolution| |INVALID ------- Comment #1 from mmarek@novell.com 2006-09-25 01:44 MST ------- In (a || !z), !z will allways be true during the first evaluation of the condition, so the value of a doesn't matter. After that, a will hold the result of malloc(). So while the code could be written in a more elegant way, it's still correct, IMO. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
participants (1)
-
bugzilla_noreply@novell.com