diff options
| author | Mattias Andrée <m@maandree.se> | 2026-05-15 01:22:19 +0200 |
|---|---|---|
| committer | Mattias Andrée <m@maandree.se> | 2026-05-15 01:22:19 +0200 |
| commit | 68d6804a43dca2749a68a557e67b98e6005ead83 (patch) | |
| tree | 9c4137a48cd37ea423578d1ac3df6e3953cb2156 /libtest/common.h | |
| parent | Fix minor errors in the test and check that we are not writing out of bounds (diff) | |
| download | librecrypt-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.h | 5 |
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);\ |
