Bug 143736 - local variable used before set
Summary: local variable used before set
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: libselinux
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-12-26 10:04 UTC by David Binderman
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version: 1.19.4-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-09-04 23:29:16 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description David Binderman 2004-12-26 10:04:13 UTC
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:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Daniel Walsh 2005-01-03 20:58:35 UTC
Fixed in libselinux-1.19.4-1


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