aboutsummaryrefslogtreecommitdiffstats
path: root/libtest/common.h
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-05-15 01:22:19 +0200
committerMattias Andrée <m@maandree.se>2026-05-15 01:22:19 +0200
commit68d6804a43dca2749a68a557e67b98e6005ead83 (patch)
tree9c4137a48cd37ea423578d1ac3df6e3953cb2156 /libtest/common.h
parentFix minor errors in the test and check that we are not writing out of bounds (diff)
downloadlibrecrypt-68d6804a43dca2749a68a557e67b98e6005ead83.tar.gz
librecrypt-68d6804a43dca2749a68a557e67b98e6005ead83.tar.bz2
librecrypt-68d6804a43dca2749a68a557e67b98e6005ead83.tar.xz
Fix some minor issues
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'libtest/common.h')
-rw-r--r--libtest/common.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libtest/common.h b/libtest/common.h
index ed9272e..ab59bab 100644
--- a/libtest/common.h
+++ b/libtest/common.h
@@ -34,6 +34,9 @@
# pragma clang diagnostic ignored "-Wunsafe-buffer-usage" /* completely broken warning */
# pragma clang diagnostic ignored "-Wdisabled-macro-expansion" /* clang is being silly: it is common practice, and it complains about libc code */
#endif
+#if defined(__GNUC__)
+# pragma GCC diagnostic ignored "-Winline"
+#endif
#include "libtest.h"
@@ -229,6 +232,7 @@ void *__mremap(void *, size_t, size_t, int, ...);
#define assert(EXPR)\
do {\
+ atomic_thread_fence(memory_order_seq_cst);\
if (!(EXPR)) {\
libtest_malloc_internal_usage++;\
fprintf(stderr, "Assetion failure at %s:%i: %s\n", __FILE__, __LINE__, #EXPR);\
@@ -299,6 +303,7 @@ void *__mremap(void *, size_t, size_t, int, ...);
# define EXPECT(EXPR)\
do {\
+ atomic_thread_fence(memory_order_seq_cst);\
if (!(EXPR)) {\
libtest_malloc_internal_usage++;\
fprintf(stderr, "Failure at %s:%i: %s\n", __FILE__, __LINE__, #EXPR);\