From d19b12c283babd8385d532e1f26bfeabfa058bcc Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 1 Nov 2022 01:24:31 +0100 Subject: [PATCH] Silence a false positive compiler warning Potential overflow which cannot happen, since the integer ranger here is just a handful of dB, nowhere near INT_MAX. --- gui/fil4.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gui/fil4.c b/gui/fil4.c index 1d86dee..23aaba3 100644 --- a/gui/fil4.c +++ b/gui/fil4.c @@ -1757,10 +1757,10 @@ static void draw_grid (Fil4UI* ui) { GRID_DB_DOT(-i); break; } - char txt[8]; - snprintf (txt, 8, "%+d", i); + char txt[16]; + snprintf (txt, sizeof(txt), "%+d", i); GRID_DB(i, txt); - snprintf (txt, 8, "%+d", -i); + snprintf (txt, sizeof(txt), "%+d", -i); GRID_DB(-i, txt); }