From: Bruno Haible Date: Sat, 4 Feb 2012 11:59:00 +0000 (+0100) Subject: get-rusage-as, get-rusage-data tests: Avoid test failure with gcc-4.7. X-Git-Tag: v0.1~1180 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;ds=sidebyside;h=4ddd9dd5c80d2058001c9bec68b7f0ef0bc3a56f;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 7fde29e09..11b6e709b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2012-02-04 Bruno Haible + 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 + stdioext: Fix last commit. * lib/fwritable.c [EPLAN9]: Include . diff --git a/tests/test-get-rusage-as.c b/tests/test-get-rusage-as.c index 8c0a80ffe..ced8ede44 100644 --- a/tests/test-get-rusage-as.c +++ b/tests/test-get-rusage-as.c @@ -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 (); diff --git a/tests/test-get-rusage-data.c b/tests/test-get-rusage-data.c index 85d9d31d1..064005236 100644 --- a/tests/test-get-rusage-data.c +++ b/tests/test-get-rusage-data.c @@ -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 ();