Clean-up: sessiond: cmd: fix bogus -Wmaybe-uninitialized
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 19 Apr 2021 15:00:23 +0000 (11:00 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 19 Apr 2021 15:00:23 +0000 (11:00 -0400)
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 <jeremie.galarneau@efficios.com>
Change-Id: Id90ca37e232385f73d54558f2a00d01cbf773a92

src/bin/lttng-sessiond/cmd.c

index 3fab5af02e94d7194fca8033755cbb7abfb93f4e..76258dc87d3e461b208a48540de527844dd7bf31 100644 (file)
@@ -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;
This page took 0.027579 seconds and 4 git commands to generate.