summaryrefslogtreecommitdiff
path: root/src/xkbcomp/keycodes.c
diff options
context:
space:
mode:
authorRan Benita <ran234@gmail.com>2014-04-25 01:14:31 +0300
committerRan Benita <ran234@gmail.com>2014-04-25 01:14:31 +0300
commit67323f41a68ee835eb442fc7a9365054de8b56c1 (patch)
treed91257961718f3031c3f9b00c5aa6fbcb9428803 /src/xkbcomp/keycodes.c
parent07fb6a6c19ab37ab02de4dc9a56fb49bd9908fe0 (diff)
downloadlibxkbcommon-67323f41a68ee835eb442fc7a9365054de8b56c1.tar.gz
libxkbcommon-67323f41a68ee835eb442fc7a9365054de8b56c1.tar.bz2
libxkbcommon-67323f41a68ee835eb442fc7a9365054de8b56c1.zip
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>
Diffstat (limited to 'src/xkbcomp/keycodes.c')
-rw-r--r--src/xkbcomp/keycodes.c2
1 files changed, 1 insertions, 1 deletions
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;