From fb5f6c30c01ecf6f4e92d7ac6a6054fc83777345 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Wed, 19 Jun 2019 21:10:57 +0200 Subject: [PATCH] wcolorpanel.c: Remove warning in rgbIntToChar MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch removes this warning. The default case should not be used. wcolorpanel.c: In function ‘rgbIntToChar’: wcolorpanel.c:2392:2: warning: ‘format’ may be used uninitialized in this function [-Wmaybe-uninitialized] sprintf(tmp, format, value[1]); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Rodolfo García Peñas (kix) --- WINGs/wcolorpanel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/WINGs/wcolorpanel.c b/WINGs/wcolorpanel.c index 5fced18a..9977aebd 100644 --- a/WINGs/wcolorpanel.c +++ b/WINGs/wcolorpanel.c @@ -2385,6 +2385,8 @@ void rgbIntToChar(W_ColorPanel *panel, int *value) case RGBhex: format = "%0X"; break; + default: + format = ""; } sprintf(tmp, format, value[0]); -- 2.11.4.GIT