From cf202eeeca9d160dae96750c7cb9453be8a78813 Mon Sep 17 00:00:00 2001 From: Yaroslav Chvanov Date: Sat, 20 May 2023 10:55:44 +0300 Subject: [PATCH] driver-hidpp20: zero initialize a struct This fixes a clang-analyze warning about uninitialized value getting stored later. --- src/driver-hidpp20.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/driver-hidpp20.c b/src/driver-hidpp20.c index fa80cc92..52bcd99e 100644 --- a/src/driver-hidpp20.c +++ b/src/driver-hidpp20.c @@ -684,7 +684,7 @@ hidpp20drv_update_led_8070_8071(struct ratbag_led *led, struct ratbag_profile* p struct hidpp20drv_data *drv_data) { struct hidpp20_profile *h_profile; - struct hidpp20_led h_led_val; + struct hidpp20_led h_led_val = {0}; struct hidpp20_led *h_led = &h_led_val; if (drv_data->capabilities & HIDPP_CAP_ONBOARD_PROFILES_8100) {