rules: always initialize idx variable gcc didn't catch this one. Signed-off-by: Ran Benita <ran234@gmail.com>
diff --git a/src/xkbcomp/rules.c b/src/xkbcomp/rules.c
index 0fe2b9b..4287da8 100644
--- a/src/xkbcomp/rules.c
+++ b/src/xkbcomp/rules.c
@@ -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) {