ecore: xcb: make sure length_name is always initialized

lib/ecore_x/xcb/ecore_xcb_icccm.c: In function ‘ecore_x_icccm_name_class_set’:
lib/ecore_x/xcb/ecore_xcb_icccm.c:320:11: warning: ‘length_name’ may be used uninitialized in this
function [-Wmaybe-uninitialized]
         s += length_name + 1;

Looking at the code this is indeed possible so better play safe here.
This commit is contained in:
Stefan Schmidt 2016-07-29 14:20:16 +02:00
parent 620d0031de
commit 461c5d2787
1 changed files with 1 additions and 1 deletions

View File

@ -302,7 +302,7 @@ ecore_x_icccm_name_class_set(Ecore_X_Window win,
const char *class)
{
char *class_string, *s;
int length_name, length_class = 0;
int length_name = 0, length_class = 0;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
CHECK_XCB_CONN;