Mercurial > hg > octave-lyh > gnulib-hg
changeset 16346:aef1ea36022d
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.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sat, 04 Feb 2012 12:59:00 +0100 |
parents | 7cf3cc0dcf46 |
children | a813bd88fc8d |
files | ChangeLog tests/test-get-rusage-as.c tests/test-get-rusage-data.c |
diffstat | 3 files changed, 18 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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.
--- 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 @@ value1 = get_rusage_as (); - malloc (0x88); + memchunk1 = malloc (0x88); value2 = get_rusage_as (); - malloc (0x281237); + memchunk2 = malloc (0x281237); value3 = get_rusage_as ();
--- 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 @@ value1 = get_rusage_data (); - malloc (0x88); + memchunk1 = malloc (0x88); value2 = get_rusage_data (); - malloc (0x281237); + memchunk2 = malloc (0x281237); value3 = get_rusage_data ();