summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites')
-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);
}
/*