diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-02-15 18:00:19 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-02-15 18:00:19 +0100 |
commit | 0a3a1b2419d80bd8e4995b4cba020bcd60945f7d (patch) | |
tree | a967d87d44812145e039c5c97e64e0052949a9ed /testsuites/fstests/support/fstest_support.c | |
parent | dosfs: Start scan with a valid data cluster (diff) | |
download | rtems-0a3a1b2419d80bd8e4995b4cba020bcd60945f7d.tar.bz2 |
fstests: Prevent compiler optimizations
Diffstat (limited to 'testsuites/fstests/support/fstest_support.c')
-rw-r--r-- | testsuites/fstests/support/fstest_support.c | 5 |
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); } /* |