|
From: Tom T. <tr...@un...> - 2005-03-09 15:46:42
|
I compiled valgrind-2.4.0.rc1 with an extra-picky gcc
and got some compiler warnings that perhaps should be fixed
(for a future release, no need to hold up 2.4).
coregrind/vg_scheduler.c 1066 warning: too few arguments for format
VG_(message)(Vg_DebugMsg,
"Thread %d supposed to be in LWP %d, but we're actually %d\n",
VG_(threads)[tid].os_state.lwpid, VG_(gettid)());
It looks like "Thread %d" needs a `tid' argument.
=======
coregrind/vg_signals.c 924 warning: suspicious sizeof(pointer_variable)
VG_(memset)(ehdr, 0, sizeof(ehdr));
It looks like sizeof(*ehdr) was intended, to clear the entire struct.
^
=======
coregrind/vg_main.c 185 warning: long unsigned int format, long long unsigned int arg (arg 5)
VG_(message)(Vg_DebugMsg,
" dispatch: %llu jumps (bb entries); of them %u (%lu%%) unchained.",
VG_(bbs_done),
VG_(unchained_jumps_done),
((ULong)(100) * (ULong)(VG_(unchained_jumps_done)))
/ ( VG_(bbs_done)==0 ? 1 : VG_(bbs_done) )
);
Changing %lu to %llu seems like the easiest fix.
=======
coregrind/vg_syscalls.c 6167 warning: long int format, long long int arg (arg 5)
coregrind/vg_syscalls.c 6167 warning: long unsigned int format, long long unsigned int arg (arg 6)
PRINT("SYSCALL[%d,%d](%3d) --> %ld (0x%lx)\n",
VG_(getpid)(), tid, syscallno, (Long)(Word)SYSRES, (ULong)SYSRES);
Changing %ld to %lld and %lx to %llx seems like the easiest fix.
=======
Thanks much for considering this,
Tom Truscott
|
|
From: Nicholas N. <nj...@cs...> - 2005-03-09 15:59:50
|
On Wed, 9 Mar 2005, Tom Truscott wrote: > I compiled valgrind-2.4.0.rc1 with an extra-picky gcc > and got some compiler warnings that perhaps should be fixed > (for a future release, no need to hold up 2.4). Nice catches, especially the memset() one. Which extra-picky gcc is this -- is it just a normal pre-4.0.0 snapshot? N |