[PATCH libevdev 1/3] tools: fix coverty "may be used uninitialized" warnings
Peter Hutterer
peter.hutterer at who-t.net
Mon Dec 21 16:01:13 PST 2015
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 at 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
More information about the Input-tools
mailing list