]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix gcc-2.96 build failures.
authorJulian Seward <jseward@acm.org>
Sat, 3 Nov 2007 11:16:31 +0000 (11:16 +0000)
committerJulian Seward <jseward@acm.org>
Sat, 3 Nov 2007 11:16:31 +0000 (11:16 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7085

massif/tests/long-time.c
massif/tests/new-cpp.cpp
massif/tests/overloaded-new.cpp

index de55d51e1dd261d6c33cb838d6d2b9cd91575ec5..97927fb13a82af97ddb8035cec5fedc2f21930a2 100644 (file)
@@ -7,15 +7,15 @@
 
 int main(void)
 {
-   int i;
+   int i, *x1, *x2, *x3, *x4;
    for (i = 0; i < 1500; i++) {
-      int* x1 = malloc( 800 * 1000);
-      int* x2 = malloc(1100 * 1000);
+      x1 = malloc( 800 * 1000);
+      x2 = malloc(1100 * 1000);
       free(x1);
-      int* x3 = malloc(1200 * 1000);
+      x3 = malloc(1200 * 1000);
       free(x2);
       free(x3);
-      int* x4 = malloc( 900 * 1000);
+      x4 = malloc( 900 * 1000);
       free(x4);
    }
    return 0;
index defdb26e2c9fdf316a3ac507e9d21d86d588dfe4..44e87c219a43e3d0d94df4c5910e0b3e7cc40bb0 100644 (file)
 using std::nothrow_t;
 
 // A big structure.  Its details don't matter.
-struct s {
-    int array[1000];
-};
+typedef struct {
+           int array[1000];
+        } s;
 
 int main(void)
 {
-    struct s* p1 = new                struct s;
-    struct s* p2 = new (std::nothrow) struct s;
+    s*        p1 = new                s;
+    s*        p2 = new (std::nothrow) s;
     char*     c1 = new                char[2000];
     char*     c2 = new (std::nothrow) char[2000];
     delete p1;
index f90096b212056cfea77be0876a007c203a7414dc..63d652f08d925457da84e201059a63f8ea123e4b 100644 (file)
@@ -10,9 +10,9 @@
 using std::nothrow_t;
 
 // A big structure.  Its details don't matter.
-struct s {
-    int array[1000];
-};
+typedef struct {
+           int array[1000];
+        } s;
 
 void* operator new (std::size_t n) throw (std::bad_alloc)
 {
@@ -46,8 +46,8 @@ void operator delete[] (void* p)
 
 int main(void)
 {
-    struct s* p1 = new                struct s;
-    struct s* p2 = new (std::nothrow) struct s;
+    s*        p1 = new                s;
+    s*        p2 = new (std::nothrow) s;
     char*     c1 = new                char[2000];
     char*     c2 = new (std::nothrow) char[2000];
     delete p1;