Bug 144654 - local variable used before set
local variable used before set
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: iprutils (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Paul Nasrat
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-10 07:30 EST by David Binderman
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-02-24 04:24:15 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Fix compiler warning (2.62 KB, patch)
2005-01-10 10:57 EST, Brian King
no flags Details | Diff

  None (edit)
Description David Binderman 2005-01-10 07:30:12 EST
Description of problem:

I just tried to compile package iprutils-2.0.13.5-1 from 
Redhat Fedora development tree.

I was shocked to find out that the compiler said

iprconfig.c:4759: warning: 'dev_record' is used uninitialized in this
function

The source code is

                } else if (dev_record) {

I agree with the compiler. Suggest code rework to reading local
variables which have not been inited. This seems to be a basic coding
error.



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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Paul Nasrat 2005-01-10 09:56:55 EST
Brian,

Another iprutils compiler error (icc I guess.
Comment 2 Brian King 2005-01-10 10:57:24 EST
Created attachment 109561 [details]
Fix compiler warning

This looks like a valid bug, although it would be quite difficult to hit. Here
is the fix. A new src rpm is also available here:
http://www-124.ibm.com/storageio/ipr/iprutils/iprutils-2.0.13.6-1.src.rpm
Comment 3 Paul Nasrat 2005-02-23 09:46:25 EST
The iprutils page seems to have vanished so the above link is no longer valid -
I can't see iprutils in the new site.  Any hints.
Comment 4 Brian King 2005-02-23 10:23:07 EST
The iprutils page has been moved to sourceforge:
http://sourceforge.net/projects/iprdd/

The latest stable iprutils package can be downloaded here:

http://prdownloads.sourceforge.net/iprdd/iprutils-2.0.13.7-1.src.rpm?download

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