]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix compiler warning about unused functions and variables
authorIvo Raisr <ivosh@ivosh.net>
Sat, 26 Sep 2015 03:45:11 +0000 (03:45 +0000)
committerIvo Raisr <ivosh@ivosh.net>
Sat, 26 Sep 2015 03:45:11 +0000 (03:45 +0000)
on older Solaris where original auxv is not present.
n-i-bz

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15685

coregrind/m_initimg/initimg-solaris.c

index 2c20e21767a6bf5d0602b67ab9df8c956dde53c7..ee4f155c08fd4eb561390a9fbd71ab6d5ec4b9e0 100644 (file)
@@ -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 ==================== */