From 37226395ad85567ec0a6a053ce02b1c931f0b415 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 11 Oct 2025 21:38:36 +0300 Subject: [PATCH] Xi: set value for led_values in CopySwapKbdFeedback() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (The existing setting of led_mask is probably wrong, but has been set like this since X11R5 and going back as far as the first version in the X Consortium source control archives.) Reported in https://gitlab.freedesktop.org/xorg/xserver/-/issues/1817: xwayland-24.1.6/redhat-linux-build/../Xi/getfctl.c:108:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*k2.led_values’ 108|-> swapl(&k2->led_values); Signed-off-by: Alan Coopersmith Part-of: --- Xi/getfctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Xi/getfctl.c b/Xi/getfctl.c index 46ff78a798..f9ea253e6d 100644 --- a/Xi/getfctl.c +++ b/Xi/getfctl.c @@ -83,6 +83,7 @@ CopySwapKbdFeedback(ClientPtr client, KbdFeedbackPtr k, char **buf) k2->pitch = k->ctrl.bell_pitch; k2->duration = k->ctrl.bell_duration; k2->led_mask = k->ctrl.leds; + k2->led_values = k->ctrl.leds; k2->global_auto_repeat = k->ctrl.autoRepeat; for (i = 0; i < 32; i++) k2->auto_repeats[i] = k->ctrl.autoRepeats[i];