diff options
Diffstat (limited to '')
-rw-r--r-- | libsimple.c | 3 | ||||
-rw-r--r-- | test.c | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/libsimple.c b/libsimple.c index d6eb2ce..641748a 100644 --- a/libsimple.c +++ b/libsimple.c @@ -87,6 +87,9 @@ test_vasprintfa(const char *expected, const char *format, ...) } #endif +#ifdef __clang__ +__attribute__((optnone)) +#endif int main(void) { @@ -43,7 +43,9 @@ round_up(size_t size) int have_custom_malloc(void) { + size_t old_alloc_fail_in = alloc_fail_in; free(malloc(1)); + alloc_fail_in = old_alloc_fail_in; return custom_malloc; } |