Bug 138254 - local variable used before set & printf problems
local variable used before set & printf problems
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: valgrind (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-11-06 04:57 EST by David Binderman
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-11-09 04:58:04 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)

  None (edit)
Description David Binderman 2004-11-06 04:57:21 EST
Description of problem:

I just tried to compile package valgrind-2.2.0-1 from 
Redhat Fedora Core 3 Test 3.

The compiler said

1.

vg_proxylwp.c(538): remark #592: variable "req" is used before its
value is set

The source code is

            reply.req = req.request;

Suggest init req before first use.

2.

vg_signals.c(1996): warning #268: the format string ends before this
argument

The source code is

      VG_(printf)("got signal %d in LWP %d (%d)\n",
                  sigNo, VG_(gettid)(), VG_(gettid)(), VG_(main_pid));

Three %d, four trailing parameters. I'm not sure what the fix is for this.



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


How reproducible:


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


Expected results:


Additional info:
Comment 1 Jakub Jelinek 2004-11-09 04:58:04 EST
The first warning is dubious, as icc doesn't take into account setjmp.
GCC's warning is much better in this case, fixed by making req volatile.

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