From 6092385bf2a5a3fdec4bf6d9f9551998ae6209ee Mon Sep 17 00:00:00 2001 From: Marc Rittinghaus Date: Fri, 3 Feb 2023 11:58:19 +0100 Subject: [PATCH] lib/uksched: Silence warning about unused variable The parent variable was not used outside the assert. This leads to a warning when asserts are disabled. This commit fixes the warning be removing the variable. Signed-off-by: Marc Rittinghaus Reviewed-by: Marco Schlumpp Approved-by: Razvan Deaconescu Tested-by: Unikraft CI GitHub-Closes: #739 --- lib/uksched/thread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/uksched/thread.c b/lib/uksched/thread.c index 23eb89b71..e2bb88eec 100644 --- a/lib/uksched/thread.c +++ b/lib/uksched/thread.c @@ -171,13 +171,13 @@ out: /** Iterates over registered thread termination functions */ static int _uk_thread_call_termtab(struct uk_thread *child) { - struct uk_thread *parent = uk_thread_current(); struct uk_thread_inittab_entry *itr; struct _inittab_call_term_args term_args; int ret = 0; /* Either we run without scheduling or we have support for ectx */ - UK_ASSERT(!parent || parent->flags & UK_THREADF_ECTX); + UK_ASSERT(!uk_thread_current() || + uk_thread_current()->flags & UK_THREADF_ECTX); /* Go over thread termination functions that match with * child's ECTX and UKTLS feature requirements -- 2.39.5