From bcdaac7220e59958fa37252d9f6ace0f10a15906 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..395984ca 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..027db9b0 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; }