From d96494e5a7ae9de4bf6a86ccf09af5f4d86d9131 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 22 Jun 2018 16:13:35 +1000 Subject: [PATCH] test: quirks: init value to avoid valgrind errors value isn't touched where the quirk doesn't exist, so we're accessing an uninitialized variable here. Signed-off-by: Peter Hutterer --- test/test-quirks.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/test-quirks.c b/test/test-quirks.c index 3052693..b3613bc 100644 --- a/test/test-quirks.c +++ b/test/test-quirks.c @@ -899,7 +899,7 @@ START_TEST(quirks_model_alps) struct litest_device *dev = litest_current_device(); struct libinput_device *device = dev->libinput_device; struct quirks *q; - bool exists, value; + bool exists, value = false; q = dev->quirks; exists = quirks_get_bool(q, QUIRK_MODEL_ALPS_TOUCHPAD, &value); @@ -918,7 +918,7 @@ START_TEST(quirks_model_wacom) { struct litest_device *dev = litest_current_device(); struct quirks *q; - bool exists, value; + bool exists, value = false; q = dev->quirks; exists = quirks_get_bool(q, QUIRK_MODEL_WACOM_TOUCHPAD, &value); @@ -937,7 +937,7 @@ START_TEST(quirks_model_apple) { struct litest_device *dev = litest_current_device(); struct quirks *q; - bool exists, value; + bool exists, value = false; q = dev->quirks; exists = quirks_get_bool(q, QUIRK_MODEL_APPLE_TOUCHPAD, &value); @@ -956,7 +956,7 @@ START_TEST(quirks_model_synaptics_serial) { struct litest_device *dev = litest_current_device(); struct quirks *q; - bool exists, value; + bool exists, value = false; q = dev->quirks; exists = quirks_get_bool(q, QUIRK_MODEL_SYNAPTICS_SERIAL_TOUCHPAD, &value); -- 2.7.4