diff options
author | iraisr <iraisr@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2015-09-26 03:45:11 +0000 |
---|---|---|
committer | iraisr <iraisr@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2015-09-26 03:45:11 +0000 |
commit | 6150d3e63c6989aa7b6540ff75d6ae104ad3aa28 (patch) | |
tree | 786ce9735b84656a997bfcfd518c5adf081c8ffb | |
parent | c0d46cd894a167eec7d92337cffdcb410e22570f (diff) | |
download | valgrind-6150d3e63c6989aa7b6540ff75d6ae104ad3aa28.tar.gz |
Fix compiler warning about unused functions and variables
on older Solaris where original auxv is not present.
n-i-bz
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15685 a5019735-40e9-0310-863c-91ae7b9d1cf9
-rw-r--r-- | coregrind/m_initimg/initimg-solaris.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/coregrind/m_initimg/initimg-solaris.c b/coregrind/m_initimg/initimg-solaris.c index 2c20e2176..ee4f155c0 100644 --- a/coregrind/m_initimg/initimg-solaris.c +++ b/coregrind/m_initimg/initimg-solaris.c @@ -275,6 +275,12 @@ static HChar *copy_str(HChar **tab, const HChar *str) 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 @@ static void copy_auxv_entry(const vki_auxv_t *orig_auxv, Int type, 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 @@ static Addr setup_client_stack(Addr init_sp, 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 ==================== */ |