From ba59427abae3a8b260e66fcfab90c9de96c3e01c Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Wed, 17 Apr 2019 11:37:56 +0100 Subject: [PATCH] Fix maybe-uninitialized warning in xf86NewInputDevice() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If SYSTEMD_LOGIND is not defined, systemd_logind_take_fd is defined as a macro evaluating to -1 by systemd-logind.h, leaving paused uninitialized. ../hw/xfree86/common/xf86Xinput.c: In function ‘xf86NewInputDevice’: ../hw/xfree86/common/xf86Xinput.c:919:16: warning: ‘paused’ may be used uninitialized in this function [-Wmaybe-uninitialized] ../hw/xfree86/common/xf86Xinput.c:877:10: note: ‘paused’ was declared here --- hw/xfree86/common/xf86Xinput.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 75235b368..07e52bcf7 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -874,7 +874,7 @@ xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable) { InputDriverPtr drv = NULL; DeviceIntPtr dev = NULL; - Bool paused; + Bool paused = FALSE; int rval; char *path = NULL;