diff options
author | Mattias Andrée <maandree@kth.se> | 2024-08-23 23:49:13 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2024-08-23 23:49:13 +0200 |
commit | 267221b8c2f7de0ea54d12ea0556d2670070ff8f (patch) | |
tree | c5aa4223e4c49f1b6e39407faf19ecaf70b98258 | |
parent | Fixes + add SHA2 support via libsha2 (diff) | |
download | libhashsum-267221b8c2f7de0ea54d12ea0556d2670070ff8f.tar.gz libhashsum-267221b8c2f7de0ea54d12ea0556d2670070ff8f.tar.bz2 libhashsum-267221b8c2f7de0ea54d12ea0556d2670070ff8f.tar.xz |
Silence some clang warnings
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | common.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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 <errno.h> #include <limits.h> #include <string.h> + #ifdef TEST # include <stdlib.h> # include <stdio.h> @@ -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) |