From: Peter Hutterer Date: Sun, 13 Oct 2024 01:06:39 +0000 (+1000) Subject: test: initialize a variable to make scan-build happy X-Git-Tag: 1.27.0~97 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=84f96de974b554b1e10c67e042601ea4efd92ab4;p=platform%2Fupstream%2Flibinput.git test: initialize a variable to make scan-build happy Assuming safe_atoi works as expected, `fuzz` cannot be uninitialized by the time we get here. But let's init it anyway to make scan-build happy. [202/249] Compiling C object libinput-test-suite.p/test_test-touch.c.o ../../../test/test-touch.c:964:2: warning: Assigned value is garbage or undefined [core.uninitialized.Assign] 964 | litest_assert_int_eq(fuzz, 10); /* device-specific */ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Note that this error message is the result of a follow-up commit, this commit is shuffled before so we have bisectable build. Part-of: --- diff --git a/test/test-touch.c b/test/test-touch.c index b6a2cc2f..a1616408 100644 --- a/test/test-touch.c +++ b/test/test-touch.c @@ -952,7 +952,7 @@ START_TEST(touch_fuzz_property) struct litest_device *dev = litest_current_device(); struct udev_device *d; const char *prop; - int fuzz; + int fuzz = 0; ck_assert_int_eq(libevdev_get_abs_fuzz(dev->evdev, ABS_X), 0); ck_assert_int_eq(libevdev_get_abs_fuzz(dev->evdev, ABS_Y), 0);