Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
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


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.