aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'common.h')
-rw-r--r--common.h9
1 files changed, 8 insertions, 1 deletions
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 <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)