Bugzilla will be upgraded to version 5.0 on December 2, 2018. The outage period for the upgrade will start at 0:00 UTC and have a duration of 12 hours
Bug 133120 - local variable used before set
local variable used before set
Product: Fedora
Classification: Fedora
Component: sane-backends (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Depends On:
  Show dependency treegraph
Reported: 2004-09-21 15:23 EDT by David Binderman
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-09-27 12:41:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description David Binderman 2004-09-21 15:23:28 EDT
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):

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:
Comment 1 Tim Waugh 2004-09-27 12:41:46 EDT
Not worth fixing: j is never used in that function, and so the
compiler more than likely optimizes this dead code out entirely.
Comment 2 David Binderman 2004-10-02 14:26:28 EDT
>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.

Note You need to log in before you can comment on or make changes to this bug.