|
From: <sv...@va...> - 2015-09-26 03:45:20
|
Author: iraisr
Date: Sat Sep 26 04:45:11 2015
New Revision: 15685
Log:
Fix compiler warning about unused functions and variables
on older Solaris where original auxv is not present.
n-i-bz
Modified:
trunk/coregrind/m_initimg/initimg-solaris.c
Modified: trunk/coregrind/m_initimg/initimg-solaris.c
==============================================================================
--- trunk/coregrind/m_initimg/initimg-solaris.c (original)
+++ trunk/coregrind/m_initimg/initimg-solaris.c Sat Sep 26 04:45:11 2015
@@ -275,6 +275,12 @@
return orig;
}
+#if defined(SOLARIS_RESERVE_SYSSTAT_ADDR) || \
+ defined(SOLARIS_RESERVE_SYSSTAT_ZONE_ADDR)
+#define ORIG_AUXV_PRESENT 1
+#endif
+
+#if defined(ORIG_AUXV_PRESENT)
/* The auxiliary vector might not be present. So we cross-check pointers from
argv and envp pointing to the string table. */
static vki_auxv_t *find_original_auxv(Addr init_sp)
@@ -328,6 +334,7 @@
VG_(printf)("valgrind: vector. Cannot continue. Sorry.\n\n");
VG_(exit)(1);
}
+#endif /* ORIG_AUXV_PRESENT */
/* This sets up the client's initial stack, containing the args,
environment and aux vector.
@@ -391,8 +398,10 @@
vg_assert(VG_(args_the_exename));
vg_assert(VG_(args_for_client));
+# if defined(ORIG_AUXV_PRESENT)
/* Get the original auxv (if any). */
vki_auxv_t *orig_auxv = find_original_auxv(init_sp);
+# endif /* ORIG_AUXV_PRESENT */
/* ==================== compute sizes ==================== */
|