[PATCH libinput] evdev: Fix uninitialized variable warning

Derek Foreman derekf at osg.samsung.com
Tue Nov 25 09:53:23 PST 2014


The early exit path in evdev_device_compare_syspath() expects
udev_device_new to be initialized to NULL, but it wasn't.

Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
---
 src/evdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/evdev.c b/src/evdev.c
index 908a8ba..3782ac4 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1451,7 +1451,7 @@ static int
 evdev_device_compare_syspath(struct udev_device *udev_device, int fd)
 {
 	struct udev *udev = udev_device_get_udev(udev_device);
-	struct udev_device *udev_device_new;
+	struct udev_device *udev_device_new = NULL;
 	struct stat st;
 	int rc = 1;
 
-- 
2.1.3



More information about the wayland-devel mailing list