Bug 160458 - 4 * local variable used before set
Summary: 4 * local variable used before set
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-06-15 09:48 UTC by David Binderman
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-07-13 11:15:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description David Binderman 2005-06-15 09:48:40 UTC
Description of problem:

I just tried to compile package rpm-4.4.1-21 from Redhat
Fedora Core development tree with the most excellent Intel C
compiler.

The compiler said

psm.c(638): remark #592: variable "a" is used before its value is set
psm.c(638): remark #592: variable "n" is used before its value is set
psm.c(638): remark #592: variable "r" is used before its value is set
psm.c(638): remark #592: variable "v" is used before its value is set

The source code is

        rpmMessage(RPMMESS_DEBUG,
                _("%s: %s(%s-%s-%s.%s) running <lua> scriptlet.\n"),
                psm->stepName, tag2sln(psm->scriptTag), n, v, r, a);

Clearly broken code. Suggest initialise local variables a, n, r and
v 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 1 Jeff Johnson 2005-07-13 11:15:59 UTC
Added to rpm-4_4 CVS, fix should be in rpm-4.4.2-0.8.


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