From: Julian Seward Date: Sat, 3 Nov 2007 11:16:31 +0000 (+0000) Subject: Fix gcc-2.96 build failures. X-Git-Tag: svn/VALGRIND_3_3_0~180 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3432ccbf8bf146a4e69da23962cf3b4cb0e85aa1;p=thirdparty%2Fvalgrind.git Fix gcc-2.96 build failures. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7085 --- diff --git a/massif/tests/long-time.c b/massif/tests/long-time.c index de55d51e1d..97927fb13a 100644 --- a/massif/tests/long-time.c +++ b/massif/tests/long-time.c @@ -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; diff --git a/massif/tests/new-cpp.cpp b/massif/tests/new-cpp.cpp index defdb26e2c..44e87c219a 100644 --- a/massif/tests/new-cpp.cpp +++ b/massif/tests/new-cpp.cpp @@ -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; diff --git a/massif/tests/overloaded-new.cpp b/massif/tests/overloaded-new.cpp index f90096b212..63d652f08d 100644 --- a/massif/tests/overloaded-new.cpp +++ b/massif/tests/overloaded-new.cpp @@ -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;