[PATCH 2/2] xkb: Initialize 'bad' Atom in _XkbSetNamesCheck

Keith Packard keithp at keithp.com
Wed Oct 22 14:48:38 PDT 2014


When _XkbCheckAtoms returns NULL for an error, it always sets the
error return code, but GCC can't figure that out, so just initialize
the local variable, 'bad', in _XkbSetNamesCheck to eliminate the warning.

Signed-off-by: Keith Packard <keithp at keithp.com>
---
 xkb/xkb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xkb/xkb.c b/xkb/xkb.c
index dc570f0..fdc5923 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -3986,7 +3986,7 @@ _XkbSetNamesCheck(ClientPtr client, DeviceIntPtr dev,
 {
     XkbDescRec *xkb;
     CARD32 *tmp;
-    Atom bad;
+    Atom bad = None;
 
     tmp = data;
     xkb = dev->key->xkbInfo->desc;
-- 
2.1.1



More information about the xorg-devel mailing list