Author: sewardj
Date: 2007-11-03 11:16:31 +0000 (Sat, 03 Nov 2007)
New Revision: 7085

Log:
Fix gcc-2.96 build failures.

Modified:
   trunk/massif/tests/long-time.c
   trunk/massif/tests/new-cpp.cpp
   trunk/massif/tests/overloaded-new.cpp


Modified: trunk/massif/tests/long-time.c
===================================================================
--- trunk/massif/tests/long-time.c      2007-11-02 21:44:02 UTC (rev 7084)
+++ trunk/massif/tests/long-time.c      2007-11-03 11:16:31 UTC (rev 7085)
@@ -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;

Modified: trunk/massif/tests/new-cpp.cpp
===================================================================
--- trunk/massif/tests/new-cpp.cpp      2007-11-02 21:44:02 UTC (rev 7084)
+++ trunk/massif/tests/new-cpp.cpp      2007-11-03 11:16:31 UTC (rev 7085)
@@ -10,14 +10,14 @@
 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;

Modified: trunk/massif/tests/overloaded-new.cpp
===================================================================
--- trunk/massif/tests/overloaded-new.cpp       2007-11-02 21:44:02 UTC (rev 
7084)
+++ trunk/massif/tests/overloaded-new.cpp       2007-11-03 11:16:31 UTC (rev 
7085)
@@ -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 @@
 
 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;


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Valgrind-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers

Reply via email to