summaryrefslogtreecommitdiff
path: root/hw/xfree86/common
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2019-04-17 11:37:56 +0100
committerJon Turney <jon.turney@dronecode.org.uk>2019-04-17 13:57:38 +0100
commitba59427abae3a8b260e66fcfab90c9de96c3e01c (patch)
treef662afab0239fd2076b1c14bd75ad9caacbae8f1 /hw/xfree86/common
parent7c266cafed14b38c039091651069ae9888c3a8ae (diff)
Fix maybe-uninitialized warning in xf86NewInputDevice()
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
Diffstat (limited to 'hw/xfree86/common')
-rw-r--r--hw/xfree86/common/xf86Xinput.c2
1 files changed, 1 insertions, 1 deletions
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;