|
From: <sv...@va...> - 2015-05-14 21:26:43
|
Author: philippe
Date: Thu May 14 22:26:36 2015
New Revision: 15232
Log:
avoid warning
m_xarray.c:133:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
(I have double checked that passing a negative argument makes the
assert fail)
Modified:
trunk/coregrind/m_xarray.c
Modified: trunk/coregrind/m_xarray.c
==============================================================================
--- trunk/coregrind/m_xarray.c (original)
+++ trunk/coregrind/m_xarray.c Thu May 14 22:26:36 2015
@@ -128,9 +128,10 @@
inline void* VG_(indexXA) ( const XArray* xa, Word n )
{
vg_assert(xa);
- // vg_assert(n >= 0); If n negative, the UWord conversion will make
- // it bigger than usedsizeE.
- vg_assert((UWord)n < xa->usedsizeE);
+ /* vg_assert(n >= 0); If n negative, the UWord conversion will make
+ it bigger than usedsizeE, which is verified to be non negative when
+ xa is modified. */
+ vg_assert((UWord)n < (UWord)xa->usedsizeE);
return ((char*)xa->arr) + n * xa->elemSzB;
}
|