]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
lib/uksched: Silence warning about unused variable
authorMarc Rittinghaus <marc.rittinghaus@unikraft.io>
Fri, 3 Feb 2023 10:58:19 +0000 (11:58 +0100)
committerUnikraft <monkey@unikraft.io>
Sat, 4 Feb 2023 02:59:37 +0000 (02:59 +0000)
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 <marc.rittinghaus@unikraft.io>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #739

lib/uksched/thread.c

index 23eb89b718088931a90958fa708444a086524934..e2bb88eec9fc8b6027a008f2220b63676809586e 100644 (file)
@@ -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