From fd333c575cd127885f31990992eea1de7d1cba4b Mon Sep 17 00:00:00 2001 From: Giovanni Simoni Date: Mon, 16 Dec 2024 23:56:20 +0100 Subject: [PATCH] Fix compiler warnings --- fuzz/fuzz_auth.c | 2 ++ fuzz/wrap.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/fuzz/fuzz_auth.c b/fuzz/fuzz_auth.c index e6882e5a..3c76119a 100644 --- a/fuzz/fuzz_auth.c +++ b/fuzz/fuzz_auth.c @@ -164,6 +164,8 @@ static void consume(const void *body, size_t len) { while (len--) x ^= *ptr++; + + (void) x; } static int conv_cb(int num_msg, const struct pam_message **msg, diff --git a/fuzz/wrap.c b/fuzz/wrap.c index 8ae5984f..ddf79ee3 100644 --- a/fuzz/wrap.c +++ b/fuzz/wrap.c @@ -92,9 +92,12 @@ extern int __wrap_asprintf(char **strp, const char *fmt, ...) { return -1; } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wformat-nonliteral" va_start(ap, fmt); r = vasprintf(strp, fmt, ap); va_end(ap); +#pragma clang diagnostic pop return r; }