Fix a few compiler warnings issued by clang 3.6.0
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14969 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_translate.c b/coregrind/m_translate.c
index 3ae779a..983125b 100644
--- a/coregrind/m_translate.c
+++ b/coregrind/m_translate.c
@@ -808,7 +808,7 @@
self check. Whilst we're at it, note any NSegments that we get,
so as to reduce the number of calls required to
VG_(am_find_nsegment) in a possible second pass. */
- const NSegment const* segs[3] = { NULL, NULL, NULL };
+ const NSegment *segs[3] = { NULL, NULL, NULL };
for (i = 0; i < vge->n_used; i++) {
Bool check = False;
diff --git a/helgrind/libhb_core.c b/helgrind/libhb_core.c
index b146e0a..d39f5a7 100644
--- a/helgrind/libhb_core.c
+++ b/helgrind/libhb_core.c
@@ -2383,7 +2383,7 @@
static void VTS__show ( const VTS* vts )
{
Word i, n;
- tl_assert(vts && vts->ts);
+ tl_assert(vts);
VG_(printf)("[");
n = vts->usedTS;
@@ -2402,7 +2402,7 @@
UWord i, n;
ThrID idx_thrid = Thr__to_ThrID(idx);
stats__vts__indexat_slow++;
- tl_assert(vts && vts->ts);
+ tl_assert(vts);
n = vts->usedTS;
for (i = 0; i < n; i++) {
ScalarTS* st = &vts->ts[i];
diff --git a/memcheck/mc_machine.c b/memcheck/mc_machine.c
index 429ff4f..e4ad60c 100644
--- a/memcheck/mc_machine.c
+++ b/memcheck/mc_machine.c
@@ -47,11 +47,13 @@
#define MC_SIZEOF_GUEST_STATE sizeof(VexGuestArchState)
-
+__attribute__((unused))
static inline Bool host_is_big_endian ( void ) {
UInt x = 0x11223344;
return 0x1122 == *(UShort*)(&x);
}
+
+__attribute__((unused))
static inline Bool host_is_little_endian ( void ) {
UInt x = 0x11223344;
return 0x3344 == *(UShort*)(&x);