]> Savannah Git Hosting - gnulib.git/commitdiff
get-rusage-as, get-rusage-data tests: Avoid test failure with gcc-4.7.
authorBruno Haible <bruno@clisp.org>
Sat, 4 Feb 2012 11:59:00 +0000 (12:59 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 4 Feb 2012 11:59:00 +0000 (12:59 +0100)
* tests/test-get-rusage-as.c (main): Assign the malloc() results to
global variables.
* tests/test-get-rusage-data.c (main): Likewise.
Reported by Jim Meyering.

ChangeLog
tests/test-get-rusage-as.c
tests/test-get-rusage-data.c

index 7fde29e09b1f0711b5f12f6ff4677e335460a987..11b6e709b5ef55dc1ceccd2d279c46baa231d884 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-02-04  Bruno Haible  <bruno@clisp.org>
+
+       get-rusage-as, get-rusage-data tests: Avoid test failure with gcc-4.7.
+       * tests/test-get-rusage-as.c (main): Assign the malloc() results to
+       global variables.
+       * tests/test-get-rusage-data.c (main): Likewise.
+       Reported by Jim Meyering.
+
 2012-02-04  Bruno Haible  <bruno@clisp.org>
 
        stdioext: Fix last commit.
index 8c0a80ffead2a6e77609fedb15d2c0b91aa7f1df..ced8ede4412726dd997490511c22af03a6f0dac8 100644 (file)
@@ -23,6 +23,9 @@
 
 #include "macros.h"
 
+void *memchunk1;
+void *memchunk2;
+
 int
 main ()
 {
@@ -30,11 +33,11 @@ main ()
 
   value1 = get_rusage_as ();
 
-  malloc (0x88);
+  memchunk1 = malloc (0x88);
 
   value2 = get_rusage_as ();
 
-  malloc (0x281237);
+  memchunk2 = malloc (0x281237);
 
   value3 = get_rusage_as ();
 
index 85d9d31d1f3fc2c820746b7472f680620d738066..064005236197dd82db02978b04c513a4c41ddee0 100644 (file)
@@ -23,6 +23,9 @@
 
 #include "macros.h"
 
+void *memchunk1;
+void *memchunk2;
+
 int
 main ()
 {
@@ -30,11 +33,11 @@ main ()
 
   value1 = get_rusage_data ();
 
-  malloc (0x88);
+  memchunk1 = malloc (0x88);
 
   value2 = get_rusage_data ();
 
-  malloc (0x281237);
+  memchunk2 = malloc (0x281237);
 
   value3 = get_rusage_data ();