Commit 67323f41a68ee835eb442fc7a9365054de8b56c1

Ran Benita 2014-04-25T01:14:31

keycodes: fix uninitialized variable Happened in one of the previous commits. For some reason, gcc doesn't warn about this, but clang does... Signed-off-by: Ran Benita <ran234@gmail.com>

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/xkbcomp/keycodes.c b/src/xkbcomp/keycodes.c
index c05ad24..d2ff9d2 100644
--- a/src/xkbcomp/keycodes.c
+++ b/src/xkbcomp/keycodes.c
@@ -72,7 +72,7 @@ static LedNameInfo *
 FindLedByName(KeyNamesInfo *info, xkb_atom_t name,
               xkb_led_index_t *idx_out)
 {
-    for (xkb_led_index_t idx; idx < info->num_led_names; idx++) {
+    for (xkb_led_index_t idx = 0; idx < info->num_led_names; idx++) {
         LedNameInfo *ledi = &info->led_names[idx];
         if (ledi->name == name) {
             *idx_out = idx;