Bug 160458 - 4 * local variable used before set
4 * local variable used before set
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Paul Nasrat
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-06-15 05:48 EDT by David Binderman
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

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


Attachments (Terms of Use)

  None (edit)
Description David Binderman 2005-06-15 05:48:40 EDT
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 07:15:59 EDT
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.