- Fix a potential race condition when checking uinput device's syspath (inactive in Fedora, we use the ioctl and never get here)
42 lines
1.2 KiB
Diff
42 lines
1.2 KiB
Diff
From db455482a4a9f9a28ab1eee8798abe6e82c9c745 Mon Sep 17 00:00:00 2001
|
|
From: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Date: Tue, 22 Dec 2015 08:48:41 +1000
|
|
Subject: [PATCH libevdev 1/3] tools: fix coverty "may be used uninitialized"
|
|
warnings
|
|
|
|
tools/libevdev-tweak-device.c:390: uninit_use_in_call: Using uninitialized
|
|
value "changes" when calling "parse_options_abs".
|
|
|
|
tools/libevdev-tweak-device.c:376: warning: 'led' may be used uninitialized in
|
|
this function
|
|
|
|
tools/libevdev-tweak-device.c:375: warning: 'axis' may be used uninitialized
|
|
in this function
|
|
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
---
|
|
tools/libevdev-tweak-device.c | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/tools/libevdev-tweak-device.c b/tools/libevdev-tweak-device.c
|
|
index 6066db0..4be2d6f 100644
|
|
--- a/tools/libevdev-tweak-device.c
|
|
+++ b/tools/libevdev-tweak-device.c
|
|
@@ -372,10 +372,10 @@ main(int argc, char **argv)
|
|
enum mode mode;
|
|
const char *path;
|
|
struct input_absinfo absinfo;
|
|
- int axis;
|
|
- int led;
|
|
+ int axis = -1;
|
|
+ int led = -1;
|
|
int led_state = -1;
|
|
- unsigned int changes; /* bitmask of changes */
|
|
+ unsigned int changes = 0; /* bitmask of changes */
|
|
int xres, yres;
|
|
|
|
mode = parse_options_mode(argc, argv, &path);
|
|
--
|
|
2.5.0
|
|
|