rules: always initialize idx variable
authorRan Benita <ran234@gmail.com>
Sun, 30 Sep 2012 10:42:44 +0000 (12:42 +0200)
committerRan Benita <ran234@gmail.com>
Sun, 30 Sep 2012 10:44:52 +0000 (12:44 +0200)
gcc didn't catch this one.

Signed-off-by: Ran Benita <ran234@gmail.com>
src/xkbcomp/rules.c

index 0fe2b9b..4287da8 100644 (file)
@@ -881,6 +881,7 @@ append_expanded_kccgst_value(struct matcher *m, darray_char *to,
         }
 
         /* Check for index. */
+        idx = XKB_LAYOUT_INVALID;
         if (i < value.len) {
             if (s[i] == '[') {
                 if (mlv != MLVO_LAYOUT && mlv != MLVO_VARIANT) {