From c4cdbc6062c542b33c84b1fed95b237a58b1711a Mon Sep 17 00:00:00 2001 From: Sam Hurst Date: Mon, 18 Oct 2021 17:00:32 -0700 Subject: [PATCH] lib: smf: Remove unused variables In function smf_execute_ancestor_exit_actions, variables "tmp_state" and "target_parent" are set but not used. Twister passed: twister -T tests/lib/smf/ Signed-off-by: Sam Hurst --- lib/smf/smf.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/smf/smf.c b/lib/smf/smf.c index eaea32f8ce5..007c6db367a 100644 --- a/lib/smf/smf.c +++ b/lib/smf/smf.c @@ -153,15 +153,9 @@ __unused static bool smf_execute_ancestor_exit_actions( struct smf_ctx *const ctx, const struct smf_state *target) { struct internal_ctx * const internal = (void *) &ctx->internal; - const struct smf_state *tmp_state; - const struct smf_state *target_parent; /* Execute all parent exit actions in reverse order */ - /* Get target state's parent state */ - target_parent = target->parent; - tmp_state = ctx->current; - for (const struct smf_state *tmp_state = ctx->current->parent; tmp_state != NULL; tmp_state = tmp_state->parent) {