Bug 143593 - 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: 2004-12-22 12:26 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-01-03 16:00:51 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Initialize variable before use (2.32 KB, patch)
2004-12-28 11:32 EST, Brian King
no flags Details | Diff
src rpm of the fixed iprutils package (284.44 KB, application/octet-stream)
2004-12-28 11:34 EST, Brian King
no flags Details

  None (edit)
Description David Binderman 2004-12-22 12:26:04 EST
Description of problem:

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

The compiler said

iprconfig.c(6786): remark #592: variable "menu_index" is used before
its value is set

The source code is

	rc = display_menu(menu_item, start_row, menu_index, &retptr);

I agree with the compiler. Suggest init menu_index before first use.


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


How reproducible:


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


Expected results:


Additional info:
Comment 2 Paul Nasrat 2004-12-22 15:37:38 EST
Mailed upstream.
Comment 3 Brian King 2004-12-28 11:32:40 EST
Created attachment 109151 [details]
Initialize variable before use

Patch against iprutils 2.0.13.4 to fix the bug.
Comment 4 Brian King 2004-12-28 11:34:28 EST
Created attachment 109152 [details]
src rpm of the fixed iprutils package

Here is a src rpm of the fix as well.
Comment 6 Paul Nasrat 2005-01-03 16:00:51 EST
Thanks for that, imported here.

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