diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2015-12-22 08:48:41 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2016-01-04 07:39:24 +1000 |
commit | 5b13ffb78f8338e5567b7719116a3c6b14b03b4c (patch) | |
tree | 4caec27edf50452dbafd4971a6c0c4a85e24ca25 /tools | |
parent | cabe03d8fe6e4579c93527a694541f436e437089 (diff) | |
download | libevdev-5b13ffb78f8338e5567b7719116a3c6b14b03b4c.tar.gz |
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>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/libevdev-tweak-device.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/libevdev-tweak-device.c b/tools/libevdev-tweak-device.c index 6066db0..295f0cd 100644 --- a/tools/libevdev-tweak-device.c +++ b/tools/libevdev-tweak-device.c @@ -372,11 +372,12 @@ 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 */ - int xres, yres; + unsigned int changes = 0; /* bitmask of changes */ + int xres = 0, + yres = 0; mode = parse_options_mode(argc, argv, &path); switch (mode) { |