Red Hat Bugzilla – Bug 133120
local variable used before set
Last modified: 2007-11-30 17:10:49 EST
Description of problem:
I just tried to compile package sane-backends-1.0.14-2 from
Redhat Fedora Core 3 Test 1.
The compiler said
umax_pp_low.c(5982): remark #592: variable "j" is used before its
value is set
The source code is
Suggest init j before first use
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Not worth fixing: j is never used in that function, and so the
compiler more than likely optimizes this dead code out entirely.
>the compiler more than likely ...
It is not entirely clear to me that this is a
suitable guess at what gcc does.
Much safer to avoid writing undefined code than just
guess the compiler does something sensible with it.
It seems worth fixing to me.