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>
This commit is contained in:
Peter Hutterer 2015-12-22 08:48:41 +10:00
parent cabe03d8fe
commit 5b13ffb78f

View file

@ -372,11 +372,12 @@ main(int argc, char **argv)
enum mode mode; enum mode mode;
const char *path; const char *path;
struct input_absinfo absinfo; struct input_absinfo absinfo;
int axis; int axis = -1;
int led; int led = -1;
int led_state = -1; int led_state = -1;
unsigned int changes; /* bitmask of changes */ unsigned int changes = 0; /* bitmask of changes */
int xres, yres; int xres = 0,
yres = 0;
mode = parse_options_mode(argc, argv, &path); mode = parse_options_mode(argc, argv, &path);
switch (mode) { switch (mode) {