summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-02-15 18:00:19 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-02-15 18:00:19 +0100
commit0a3a1b2419d80bd8e4995b4cba020bcd60945f7d (patch)
treea967d87d44812145e039c5c97e64e0052949a9ed
parentdosfs: Start scan with a valid data cluster (diff)
downloadrtems-0a3a1b2419d80bd8e4995b4cba020bcd60945f7d.tar.bz2
fstests: Prevent compiler optimizations
-rw-r--r--testsuites/fstests/support/fstest_support.c5
1 files changed, 4 insertions, 1 deletions
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);
}
/*