evdev: default to log error priority
authorPeter Hutterer <peter.hutterer@who-t.net>
Mon, 19 Jun 2017 00:37:36 +0000 (10:37 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Mon, 19 Jun 2017 00:37:36 +0000 (10:37 +1000)
Fixes compiler warning:
evdev.c:2899:2: warning: 'pri' may be used uninitialized in this function
[-Wmaybe-uninitialized]

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
src/evdev.c

index f0f790675a4388293e973a516cb75922a63bb74f..a6804149a40c60547a9afe85f2277bbe147cd818 100644 (file)
@@ -2878,7 +2878,7 @@ libevdev_log_func(const struct libevdev *evdev,
                  va_list args)
 {
        struct libinput *libinput = data;
-       enum libinput_log_priority pri;
+       enum libinput_log_priority pri = LIBEVDEV_LOG_ERROR;
        const char prefix[] = "libevdev: ";
        char fmt[strlen(format) + strlen(prefix) + 1];