From 1612d2f34560015b611b86cfddb46278cbf5d7c6 Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Fri, 14 May 2021 18:10:20 +0200 Subject: [PATCH] WINGs: increase temporary buffer to silence a gcc warning The code limits the integer number to 0..359 so we need 4 bytes to store that, but that require too complex flow processing for compilers to deduce it. It does not cost to increase the temporary buffer to the minimum size requested by GCC, so let's do this, because spurious warnings can potentially divert us from more important ones. Signed-off-by: Christophe CURIS --- WINGs/wcolorpanel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WINGs/wcolorpanel.c b/WINGs/wcolorpanel.c index 561c0760..a84b2d7e 100644 --- a/WINGs/wcolorpanel.c +++ b/WINGs/wcolorpanel.c @@ -2645,7 +2645,7 @@ static void hsbTextFieldCallback(void *observerData, WMNotification * notificati { CPColor cpColor; int value[3]; - char tmp[4]; + char tmp[12]; /* We only 4 bytes needed, but compilers cannot know that */ int n; W_ColorPanel *panel = (W_ColorPanel *) observerData;