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>
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;