Bug 143736 - local variable used before set
local variable used before set
Product: Fedora
Classification: Fedora
Component: libselinux (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Depends On:
  Show dependency treegraph
Reported: 2004-12-26 05:04 EST by David Binderman
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version: 1.19.4-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-09-04 19:29:16 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-12-26 05:04:13 EST
Description of problem:

I just tried to compile package libselinux-1.19.3-1 from 
Redhat Fedora development tree.

The compiler said

avcstat.c(200): remark #592: variable "last" is used before its value
is set

The source code is

                        rel.lookups = tot.lookups - last.lookups;

I agree with the compiler. Maybe local variable "last" needs to be
declared outside the for loop, not inside ?

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:
Comment 1 Daniel Walsh 2005-01-03 15:58:35 EST
Fixed in libselinux-1.19.4-1

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