From 0a3a1b2419d80bd8e4995b4cba020bcd60945f7d Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 15 Feb 2013 18:00:19 +0100 Subject: fstests: Prevent compiler optimizations --- testsuites/fstests/support/fstest_support.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'testsuites') diff --git a/testsuites/fstests/support/fstest_support.c b/testsuites/fstests/support/fstest_support.c index cbd832687a..164ef7b79c 100644 --- a/testsuites/fstests/support/fstest_support.c +++ b/testsuites/fstests/support/fstest_support.c @@ -29,6 +29,8 @@ #include "fstest.h" #include "pmacros.h" +volatile void *prevent_compiler_optimizations; + /* Break out of a chroot() environment in C */ static void break_out_of_chroot(void) { @@ -42,7 +44,8 @@ static void break_out_of_chroot(void) rtems_test_assert(rv == 0); /* Perform deferred memory frees */ - free(malloc(1)); + prevent_compiler_optimizations = malloc(1); + free(prevent_compiler_optimizations); } /* -- cgit v1.2.3