From 3e47be6dfb6ce33d0879ed2b28175ebf429e9c01 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Mon, 19 Apr 2021 11:00:23 -0400 Subject: [PATCH] Clean-up: sessiond: cmd: fix bogus -Wmaybe-uninitialized MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Old gcc versions report: cmd.c:4751: ‘query_target_action’ may be used uninitialized in this function [-Wmaybe-uninitialized] For this to be reachable, a query target would have to change suddenly during the execution of the function. Signed-off-by: Jérémie Galarneau Change-Id: Id90ca37e232385f73d54558f2a00d01cbf773a92 --- src/bin/lttng-sessiond/cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index 3fab5af02..76258dc87 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -4660,7 +4660,7 @@ enum lttng_error_code cmd_execute_error_query(const struct lttng_credentials *cm { enum lttng_error_code ret_code; const struct lttng_trigger *query_target_trigger; - struct lttng_action *query_target_action; + struct lttng_action *query_target_action = NULL; struct lttng_trigger *matching_trigger = NULL; const char *trigger_name; uid_t trigger_owner; -- 2.34.1