diff options
| author | José Expósito <jose.exposito89@gmail.com> | 2022-11-23 18:50:38 +0100 |
|---|---|---|
| committer | José Expósito <jose.exposito89@gmail.com> | 2022-11-23 18:50:38 +0100 |
| commit | 41e61c1c13aca3e5fed0cb83ef16422a0bfa7158 (patch) | |
| tree | 9b06b24d9801a8bd7d7d3611a2e1072c8d5b0221 /test | |
| parent | 3726de351d46dd0f92ff54e577c5a4ee3c913734 (diff) | |
| download | libinput-41e61c1c13aca3e5fed0cb83ef16422a0bfa7158.tar.gz | |
test: fix uninitialized variables
Fix the warnings generated:
[232/243] Compiling C object libinput-test-suite.p/test_test-pad.c.o
../test/test-pad.c:211:3: warning: variable 'count' is uninitialized
when used here [-Wuninitialized]
count++;
^~~~~
../test/test-pad.c:261:3: warning: variable 'count' is uninitialized
when used here [-Wuninitialized]
count++;
^~~~~
When building with Clang v15 and without libwacom:
$ CC=clang CXX=clang++ meson builddir -Dlibwacom=false
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Diffstat (limited to 'test')
| -rw-r--r-- | test/test-pad.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test-pad.c b/test/test-pad.c index 0c52a9dc..334558ed 100644 --- a/test/test-pad.c +++ b/test/test-pad.c @@ -183,7 +183,7 @@ START_TEST(pad_button_intuos) unsigned int expected_number = 0; struct libinput_event *ev; struct libinput_event_tablet_pad *pev; - unsigned int count; + unsigned int count = 0; /* Intuos button mapping is sequential up from BTN_0 and continues * with BTN_A */ @@ -243,7 +243,7 @@ START_TEST(pad_button_bamboo) unsigned int expected_number = 0; struct libinput_event *ev; struct libinput_event_tablet_pad *pev; - unsigned int count; + unsigned int count = 0; if (!libevdev_has_event_code(dev->evdev, EV_KEY, BTN_LEFT)) return; |
