1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-18 20:10:29 +01:00

wcolorpanel.c Avoid compiler warning

This patch removes this warning. The patch adds a switch case that never should happend.

wcolorpanel.c: In function ‘rgbInit’:
wcolorpanel.c:3403:2: warning: ‘format’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  sprintf(tmp, format, panel->color.rgb.green);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
This commit is contained in:
Rodolfo García Peñas (kix)
2019-06-19 21:10:56 +02:00
committed by Carlos R. Mafra
parent f0f95165e4
commit 972d85610a

View File

@@ -3396,6 +3396,9 @@ static void rgbInit(W_ColorPanel * panel)
case RGBhex:
format = "%0X";
break;
default:
/* Avoid compiler warning */
format = "";
}
sprintf(tmp, format, panel->color.rgb.red);