]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
gcc-2.96 build fixes.
authorJulian Seward <jseward@acm.org>
Tue, 15 Mar 2005 01:41:08 +0000 (01:41 +0000)
committerJulian Seward <jseward@acm.org>
Tue, 15 Mar 2005 01:41:08 +0000 (01:41 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3362

memcheck/tests/scalar.c
memcheck/tests/str_tester.c
none/tests/thread-exits.c

index dfe02d9b5a15c8401f20bbe8b72393df814264d5..882f24dbffc66148b8038011fe726ef1ce7b7f6f 100644 (file)
 // PRE_MEM_READ/PRE_MEM_WRITE calls.  (Note that Memcheck and Addrcheck will
 // always issue an error message immediately before these seg faults occur).
 
+#include <asm/ipc.h>
+#include <sched.h>
+#include <signal.h>
+
 int main(void)
 {
    // uninitialised, but we know px[0] is 0x0
@@ -522,7 +526,6 @@ int main(void)
    // XXX: This is simplistic -- need to do all the sub-cases properly.
    // XXX: Also, should be 6 scalar errors, except glibc's syscall() doesn't
    //      use the 6th one!
-   #include <asm/ipc.h>
    GO(__NR_ipc, "5s 0m");
    SY(__NR_ipc, x0+4, x0, x0, x0, x0, x0); FAIL;
 
@@ -535,8 +538,6 @@ int main(void)
  //SY(__NR_sigreturn); // (Not yet handled by Valgrind) FAIL;
 
    // __NR_clone 120
-   #include <sched.h>
-   #include <signal.h>
 #ifndef CLONE_PARENT_SETTID
 #define CLONE_PARENT_SETTID    0x00100000
 #endif
index 69c20ffeff0133100606c945c128c85b03d7bc37..68fb8081737a98f310901057e0fe29c2c8858443 100644 (file)
@@ -175,10 +175,11 @@ test_strcpy (void)
   SIMPLE_COPY(strcpy, 16, "6666666666666666", 57);
 
   /* Simple test using implicitly coerced `void *' arguments.  */
-  const void *src = "frobozz";
-  void *dst = one;
-  check (strcpy (dst, src) == dst, 1);
-  equal (dst, "frobozz", 2);
+  { const void *src = "frobozz";
+    void *dst = one;
+    check (strcpy (dst, src) == dst, 1);
+    equal (dst, "frobozz", 2);
+  }
 }
 
 static void
index a740fef928a441621640681b4572bbf397c420fa..545657d2791e149b20c7d4cb00cb553c63deca69 100644 (file)
@@ -92,12 +92,12 @@ int main()
        pthread_t pth;
        sigset_t mask;
        int status;
+       struct sigaction sa;
 
        sigemptyset(&mask);
        sigaddset(&mask, SIGCHLD);
        sigprocmask(SIG_BLOCK, &mask, NULL);
 
-       struct sigaction sa;
        sa.sa_handler = handler;
        sa.sa_flags = 0;
        sigfillset(&sa.sa_mask);