From 762b231e0b08cb0600ac018038c32eb1f327ad54 Mon Sep 17 00:00:00 2001 From: "Bryce W. Harrington" Date: Wed, 7 May 2014 01:11:07 +0000 Subject: [PATCH] clients: Initialize label in keyboard handling code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Quells warning: clients/keyboard.c: In function ‘keyboard_handle_key.isra.5’: clients/keyboard.c:556:11: warning: ‘label’ may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Bryce Harrington --- clients/keyboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/keyboard.c b/clients/keyboard.c index cd1ad586..7c11cec5 100644 --- a/clients/keyboard.c +++ b/clients/keyboard.c @@ -530,7 +530,7 @@ append(char *s1, const char *s2) static void keyboard_handle_key(struct keyboard *keyboard, uint32_t time, const struct key *key, struct input *input, enum wl_pointer_button_state state) { - const char *label; + const char *label = NULL; switch(keyboard->state) { case KEYBOARD_STATE_DEFAULT :