Fix some more 'make check' warnings, ones that appear on non-Linux
platforms.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9238 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/massif/tests/malloc_usable.c b/massif/tests/malloc_usable.c
index e825e3d..e252416 100644
--- a/massif/tests/malloc_usable.c
+++ b/massif/tests/malloc_usable.c
@@ -5,12 +5,12 @@
 
 int main(void)
 {
+#  if !defined(_AIX)
    // Because our allocations are in multiples of 8 or 16, 99 will round up
    // to 104 or 112.
    int* x = malloc(99);
 
    // XXX: would be better to have a HAVE_MALLOC_USABLE_SIZE variable here
-#  if !defined(_AIX)
    assert(104 == malloc_usable_size(x) ||
           112 == malloc_usable_size(x));
    assert(  0 == malloc_usable_size(NULL));
diff --git a/memcheck/tests/malloc_usable.c b/memcheck/tests/malloc_usable.c
index 8055c95..7e912dd 100644
--- a/memcheck/tests/malloc_usable.c
+++ b/memcheck/tests/malloc_usable.c
@@ -5,12 +5,12 @@
 
 int main(void)
 {
+#  if !defined(_AIX)
    // Because Memcheck marks any slop as inaccessible, it doesn't round up
    // sizes for malloc_usable_size().
    int* x = malloc(99);
 
-   // DDD: would be better to have a HAVE_MALLOC_USABLE_SIZE variable here
-#  if !defined(_AIX)
+   // XXX: would be better to have a HAVE_MALLOC_USABLE_SIZE variable here
    assert(99 == malloc_usable_size(x));
    assert( 0 == malloc_usable_size(NULL));
    assert( 0 == malloc_usable_size((void*)0xdeadbeef));
diff --git a/memcheck/tests/memalign2.c b/memcheck/tests/memalign2.c
index daddb25..473c924 100644
--- a/memcheck/tests/memalign2.c
+++ b/memcheck/tests/memalign2.c
@@ -19,6 +19,10 @@
 
 int main ( void )
 {
+#  if defined(_AIX)
+   printf("AIX 5.2 knows about neither memalign() nor posix_memalign().\n");
+
+#  else
    // Nb: assuming VG_MIN_MALLOC_SZB is 8!
    // Should work with both 32-bit and 64-bit pointers, though.
 
@@ -26,10 +30,6 @@
    int  res;
    assert(sizeof(long int) == sizeof(void*));
 
-#  if defined(_AIX)
-   printf("AIX 5.2 knows about neither memalign() nor posix_memalign().\n");
-
-#  else
    p = memalign(0, 100);      assert(0 == (long)p % 8);
    p = memalign(1, 100);      assert(0 == (long)p % 8);
    p = memalign(2, 100);      assert(0 == (long)p % 8);
diff --git a/none/tests/rlimit_nofile.c b/none/tests/rlimit_nofile.c
index c563c5f..2d8304e 100644
--- a/none/tests/rlimit_nofile.c
+++ b/none/tests/rlimit_nofile.c
@@ -37,8 +37,9 @@
 
    if (newrlim.rlim_cur != oldrlim.rlim_cur / 2)
    {
-      fprintf(stderr, "rlim_cur is %lu (should be %lu)\n",
-              newrlim.rlim_cur, oldrlim.rlim_cur / 2);
+      fprintf(stderr, "rlim_cur is %llu (should be %llu)\n",
+              (unsigned long long)newrlim.rlim_cur,
+              (unsigned long long)oldrlim.rlim_cur / 2);
    }
 
    if (newrlim.rlim_max != oldrlim.rlim_max)
diff --git a/none/tests/susphello.c b/none/tests/susphello.c
index b0d53fd..e0e29c3 100644
--- a/none/tests/susphello.c
+++ b/none/tests/susphello.c
@@ -20,7 +20,7 @@
 #include <unistd.h>
 #include <dlfcn.h>
 
-
+#include <stdio.h>
 #include <pthread.h>
 #include <unistd.h>
 #include <string.h>
diff --git a/perf/tinycc.c b/perf/tinycc.c
index 5bef066..0a59cc3 100644
--- a/perf/tinycc.c
+++ b/perf/tinycc.c
@@ -20606,7 +20606,7 @@
 void rt_error(ucontext_t *uc, const char *fmt, ...)
 {
     va_list ap;
-    unsigned long pc;
+    unsigned long pc = 0;  // shut gcc up
     int i;
 
     va_start(ap, fmt);