Bug 138254 - local variable used before set & printf problems
Summary: local variable used before set & printf problems
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: valgrind
Version: 3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-11-06 09:57 UTC by David Binderman
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-11-09 09:58:04 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description David Binderman 2004-11-06 09:57:21 UTC
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 09:58:04 UTC
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.