From 267221b8c2f7de0ea54d12ea0556d2670070ff8f Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 23 Aug 2024 23:49:13 +0200 Subject: Silence some clang warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- common.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'common.h') diff --git a/common.h b/common.h index ac153b6..117972b 100644 --- a/common.h +++ b/common.h @@ -1,9 +1,16 @@ /* See LICENSE file for copyright and license details. */ +#if defined(__clang__) +# pragma clang diagnostic ignored "-Wunsafe-buffer-usage" +# pragma clang diagnostic ignored "-Wpadded" +# pragma clang diagnostic ignored "-Wcomma" +# pragma clang diagnostic ignored "-Wcovered-switch-default" +#endif #include "libhashsum.h" #include #include #include + #ifdef TEST # include # include @@ -155,7 +162,7 @@ run_tests(const char *name, enum libhashsum_algorithm algorithm, size_t hash_siz return !ok; } -#define TEST_MAIN(NAME, ID)\ +# define TEST_MAIN(NAME, ID)\ char hexsum[LIBHASHSUM_##ID##_HASH_SIZE * 2 + 1];\ return run_tests(NAME, LIBHASHSUM_##ID, LIBHASHSUM_##ID##_HASH_SIZE,\ testcases, sizeof(testcases) / sizeof(*testcases), hexsum) -- cgit v1.2.3-70-g09d2