From c5be4b1888768738123cd864176b73a51302e50f Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 2 Jan 2022 13:30:34 +0100 Subject: [PATCH] Fix two mundane clang warnings in the testsuite --- .../invalid_malloc_object_size_small.c | 5 +++-- .../invalid_malloc_object_size_small_quarantine.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/test/simple-memory-corruption/invalid_malloc_object_size_small.c b/test/simple-memory-corruption/invalid_malloc_object_size_small.c index f1796a3..126ff2b 100644 --- a/test/simple-memory-corruption/invalid_malloc_object_size_small.c +++ b/test/simple-memory-corruption/invalid_malloc_object_size_small.c @@ -1,9 +1,10 @@ #include +#include "../test_util.h" + size_t malloc_object_size(void *ptr); -__attribute__((optimize(0))) -int main() { +OPTNONE int main(void) { char *p = malloc(16); if (!p) { return 1; diff --git a/test/simple-memory-corruption/invalid_malloc_object_size_small_quarantine.c b/test/simple-memory-corruption/invalid_malloc_object_size_small_quarantine.c index ac8a7e8..168dc23 100644 --- a/test/simple-memory-corruption/invalid_malloc_object_size_small_quarantine.c +++ b/test/simple-memory-corruption/invalid_malloc_object_size_small_quarantine.c @@ -1,9 +1,10 @@ #include +#include "../test_util.h" + size_t malloc_object_size(void *ptr); -__attribute__((optimize(0))) -int main() { +OPTNONE int main(void) { void *p = malloc(16); if (!p) { return 1;