|
From: <sv...@va...> - 2015-08-03 21:21:49
|
Author: florian
Date: Mon Aug 3 22:21:42 2015
New Revision: 15480
Log:
Fix printf format inconsistencies as pointed out by gcc -Wformat-signedness.
Modified:
trunk/helgrind/hg_basics.c
trunk/helgrind/hg_basics.h
trunk/helgrind/hg_errors.c
trunk/helgrind/hg_main.c
trunk/helgrind/libhb_core.c
Modified: trunk/helgrind/hg_basics.c
==============================================================================
--- trunk/helgrind/hg_basics.c (original)
+++ trunk/helgrind/hg_basics.c Mon Aug 3 22:21:42 2015
@@ -77,7 +77,7 @@
UWord HG_(clo_conflict_cache_size) = 2000000;
-Word HG_(clo_sanity_flags) = 0;
+UWord HG_(clo_sanity_flags) = 0;
Bool HG_(clo_free_is_write) = False;
Modified: trunk/helgrind/hg_basics.h
==============================================================================
--- trunk/helgrind/hg_basics.h (original)
+++ trunk/helgrind/hg_basics.h Mon Aug 3 22:21:42 2015
@@ -101,7 +101,7 @@
/* Sanity check level. This is an or-ing of
SCE_{THREADS,LOCKS,BIGRANGE,ACCESS,LAOG}. */
-extern Word HG_(clo_sanity_flags);
+extern UWord HG_(clo_sanity_flags);
/* Treat heap frees as if the memory was written immediately prior to
the free. This shakes out races in which memory is referenced by
Modified: trunk/helgrind/hg_errors.c
==============================================================================
--- trunk/helgrind/hg_errors.c (original)
+++ trunk/helgrind/hg_errors.c Mon Aug 3 22:21:42 2015
@@ -1296,7 +1296,7 @@
if (threadp->coretid == VG_INVALID_THREADID)
VG_(printf)(" tid (exited)\n");
else
- VG_(printf)(" tid %d\n", threadp->coretid);
+ VG_(printf)(" tid %u\n", threadp->coretid);
{
Lock** locksHeldW_P;
locksHeldW_P = enumerate_WordSet_into_LockP_vector(
Modified: trunk/helgrind/hg_main.c
==============================================================================
--- trunk/helgrind/hg_main.c (original)
+++ trunk/helgrind/hg_main.c Mon Aug 3 22:21:42 2015
@@ -520,7 +520,7 @@
if (thr->coretid == VG_INVALID_THREADID)
VG_(printf)("tid (exited) ");
else
- VG_(printf)("tid %d ", thr->coretid);
+ VG_(printf)("tid %u ", thr->coretid);
}
}
@@ -1037,7 +1037,7 @@
static void shadow_mem_make_NoAccess_NoFX ( Thread* thr, Addr aIN, SizeT len )
{
if (0 && len > 500)
- VG_(printf)("make NoAccess_NoFX ( %#lx, %ld )\n", aIN, len );
+ VG_(printf)("make NoAccess_NoFX ( %#lx, %lu )\n", aIN, len );
// has no effect (NoFX)
libhb_srange_noaccess_NoFX( thr->hbthr, aIN, len );
}
@@ -1045,7 +1045,7 @@
static void shadow_mem_make_NoAccess_AHAE ( Thread* thr, Addr aIN, SizeT len )
{
if (0 && len > 500)
- VG_(printf)("make NoAccess_AHAE ( %#lx, %ld )\n", aIN, len );
+ VG_(printf)("make NoAccess_AHAE ( %#lx, %lu )\n", aIN, len );
// Actually Has An Effect (AHAE)
libhb_srange_noaccess_AHAE( thr->hbthr, aIN, len );
}
@@ -1053,7 +1053,7 @@
static void shadow_mem_make_Untracked ( Thread* thr, Addr aIN, SizeT len )
{
if (0 && len > 500)
- VG_(printf)("make Untracked ( %#lx, %ld )\n", aIN, len );
+ VG_(printf)("make Untracked ( %#lx, %lu )\n", aIN, len );
libhb_srange_untrack( thr->hbthr, aIN, len );
}
@@ -5021,7 +5021,7 @@
/* --- --- User-visible client requests --- --- */
case VG_USERREQ__HG_CLEAN_MEMORY:
- if (0) VG_(printf)("VG_USERREQ__HG_CLEAN_MEMORY(%#lx,%ld)\n",
+ if (0) VG_(printf)("VG_USERREQ__HG_CLEAN_MEMORY(%#lx,%lu)\n",
args[1], args[2]);
/* Call die_mem to (expensively) tidy up properly, if there
are any held locks etc in the area. Calling evh__die_mem
@@ -5053,7 +5053,7 @@
}
case _VG_USERREQ__HG_ARANGE_MAKE_UNTRACKED:
- if (0) VG_(printf)("HG_ARANGE_MAKE_UNTRACKED(%#lx,%ld)\n",
+ if (0) VG_(printf)("HG_ARANGE_MAKE_UNTRACKED(%#lx,%lu)\n",
args[1], args[2]);
if (args[2] > 0) { /* length */
evh__untrack_mem(args[1], args[2]);
@@ -5061,7 +5061,7 @@
break;
case _VG_USERREQ__HG_ARANGE_MAKE_TRACKED:
- if (0) VG_(printf)("HG_ARANGE_MAKE_TRACKED(%#lx,%ld)\n",
+ if (0) VG_(printf)("HG_ARANGE_MAKE_TRACKED(%#lx,%lu)\n",
args[1], args[2]);
if (args[2] > 0) { /* length */
evh__new_mem(args[1], args[2]);
@@ -5069,7 +5069,7 @@
break;
case _VG_USERREQ__HG_GET_ABITS:
- if (0) VG_(printf)("HG_GET_ABITS(%#lx,%#lx,%ld)\n",
+ if (0) VG_(printf)("HG_GET_ABITS(%#lx,%#lx,%lu)\n",
args[1], args[2], args[3]);
UChar *zzabit = (UChar *) args[2];
if (zzabit == NULL
Modified: trunk/helgrind/libhb_core.c
==============================================================================
--- trunk/helgrind/libhb_core.c (original)
+++ trunk/helgrind/libhb_core.c Mon Aug 3 22:21:42 2015
@@ -1503,7 +1503,7 @@
sequentialise_CacheLine( csvals, &csvalsUsed,
N_LINE_ARANGE, cl );
tl_assert(csvalsUsed >= 1 && csvalsUsed <= N_LINE_ARANGE);
- if (0) VG_(printf)("%lu ", csvalsUsed);
+ if (0) VG_(printf)("%ld ", csvalsUsed);
lineZ->dict[0] = lineZ->dict[1]
= lineZ->dict[2] = lineZ->dict[3] = SVal_INVALID;
@@ -2625,7 +2625,7 @@
n = vts->usedTS;
for (i = 0; i < n; i++) {
const ScalarTS *st = &vts->ts[i];
- VG_(printf)(i < n-1 ? "%u:%llu " : "%u:%llu", st->thrid, (ULong)st->tym);
+ VG_(printf)(i < n-1 ? "%d:%llu " : "%d:%llu", st->thrid, (ULong)st->tym);
}
VG_(printf)("]");
}
@@ -5050,7 +5050,7 @@
(XACmpFn_t)cmp__ULong_n_EC__by_ULong
);
if (0) VG_(printf)("record_race_info %u %u %u confThr %p "
- "confTym %llu found %d (%lu,%lu)\n",
+ "confTym %llu found %d (%ld,%ld)\n",
Cfailed, Kfailed, Cw,
confThr, confTym, found, firstIx, lastIx);
/* We can't indefinitely collect stack traces at VTS
@@ -5779,7 +5779,7 @@
stats__cache_make_New_arange += (ULong)len;
if (0 && len > 500)
- VG_(printf)("make New ( %#lx, %ld )\n", a, len );
+ VG_(printf)("make New ( %#lx, %lu )\n", a, len );
if (0) {
static UWord n_New_in_cache = 0;
@@ -6445,8 +6445,8 @@
live++;
hgthread = hgthread->admin;
}
- VG_(printf)(" libhb: threads live: %d exit_and_joinedwith %d"
- " exit %d joinedwith %d\n",
+ VG_(printf)(" libhb: threads live: %u exit_and_joinedwith %u"
+ " exit %u joinedwith %u\n",
live, llexit_and_joinedwith_done,
llexit_done, joinedwith_done);
VG_(printf)(" libhb: %d verydead_threads, "
@@ -6505,7 +6505,7 @@
/ (Double)(non0chain ? non0chain : 1));
for (i = 0; i <= MAXCHAIN; i++) {
if (chains[i] != 0)
- VG_(printf)( "[%d%s]=%d ",
+ VG_(printf)( "[%u%s]=%u ",
i, i == MAXCHAIN ? "+" : "",
chains[i]);
}
@@ -6860,9 +6860,9 @@
PlenCONSUME(APC, ARE, 1, APClen);
if (0)
- VG_(printf) ("addr %p[%ld] ARE %p"
- " BPC %p[%ld] BFC %p[%ld] FSM %p[%ld]"
- " AFC %p[%ld] APC %p[%ld]\n",
+ VG_(printf) ("addr %p[%lu] ARE %p"
+ " BPC %p[%lu] BFC %p[%lu] FSM %p[%lu]"
+ " AFC %p[%lu] APC %p[%lu]\n",
(void*)addr, len, (void*)ARE,
(void*)BPC, BPClen, (void*)BFC, BFClen, (void*)FSM, FSMlen,
(void*)AFC, AFClen, (void*)APC, APClen);
|