From 2a5506170a80b1ad75ee84da0007c672d654c23b Mon Sep 17 00:00:00 2001 From: Dor Askayo Date: Sat, 19 Feb 2022 16:05:38 +0200 Subject: [PATCH] core: Initialize g_autofree with NULL This prevents build warnings about use of potentially uninitialized variables. Part-of: --- src/core/meta-pad-action-mapper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/meta-pad-action-mapper.c b/src/core/meta-pad-action-mapper.c index ac34ea98f..d80878304 100644 --- a/src/core/meta-pad-action-mapper.c +++ b/src/core/meta-pad-action-mapper.c @@ -642,7 +642,7 @@ meta_pad_action_mapper_handle_action (MetaPadActionMapper *mapper, { MetaPadDirection direction = META_PAD_DIRECTION_NONE; g_autoptr (GSettings) settings1 = NULL, settings2 = NULL; - g_autofree char *accel1, *accel2; + g_autofree char *accel1 = NULL, *accel2 = NULL; gboolean handled; if (action == META_PAD_ACTION_RING) @@ -748,7 +748,7 @@ compose_directional_action_label (MetaPadDirection direction1, MetaPadDirection direction2, GSettings *value2) { - g_autofree char *accel1, *accel2; + g_autofree char *accel1 = NULL, *accel2 = NULL; GString *str; accel1 = g_settings_get_string (value1, "keybinding");