malloc04 and malloctest tests from the rtems test-suite fails when checking the return value of malloc(). The check is optimized away and always fails. --- testsuites/libtests/malloc04/init.c | 2 +- testsuites/libtests/malloctest/init.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/testsuites/libtests/malloc04/init.c b/testsuites/libtests/malloc04/init.c index 632ea28..73023d6 100644 --- a/testsuites/libtests/malloc04/init.c +++ b/testsuites/libtests/malloc04/init.c @@ -79,7 +79,7 @@ rtems_task Init( { Heap_Control *real_heap; Heap_Area area; - void *p; + static void *p; TEST_BEGIN(); diff --git a/testsuites/libtests/malloctest/init.c b/testsuites/libtests/malloctest/init.c index 577f557..d89f630 100644 --- a/testsuites/libtests/malloctest/init.c +++ b/testsuites/libtests/malloctest/init.c @@ -1378,11 +1378,11 @@ rtems_task Init( static void test_early_malloc( void ) { - void *p; - char *q; - void *r; - void *s; - void *t; + static void *p; + static char *q; + static void *r; + static void *s; + static void *t; p = malloc( 1 ); rtems_test_assert( p != NULL ); -- 2.7.4 _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel