Bug 143736

Summary: local variable used before set
Product: [Fedora] Fedora Reporter: David Binderman <dcb314>
Component: libselinuxAssignee: Daniel Walsh <dwalsh>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: sundaram
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.19.4-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-04 23:29:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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