From 974f40a1a89ac0f9888307f8eb76081f3b4718d1 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sun, 17 Nov 2024 23:21:03 +0100 Subject: [PATCH] Fix harmless -Wsign-compare warning (#699) `sizeof(buf) == 128` so the signed comparison is always within range. --- cutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cutils.c b/cutils.c index 5515b460..507c30cc 100644 --- a/cutils.c +++ b/cutils.c @@ -190,7 +190,7 @@ int __attribute__((format(printf, 2, 3))) dbuf_printf(DynBuf *s, va_start(ap, fmt); len = vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); - if (len < sizeof(buf)) { + if (len < (int)sizeof(buf)) { /* fast case */ return dbuf_put(s, (uint8_t *)buf, len); } else {