From: Tomas Vanek Date: Mon, 9 May 2022 20:54:59 +0000 (+0200) Subject: target: fix clang static analyzer warning X-Git-Tag: v0.12.0-rc1~213 X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=commitdiff_plain;h=0f11f951e7774c54953f3f06916dcb62ac9b086d target: fix clang static analyzer warning Removes Warning: line 6482, column 12 1st function call argument is an uninitialized value Use target ptr directly as checked in previous lines instead of dereferencing head->target Change-Id: I6804b776fd493af71f3098d702f9cdc7acb50151 Signed-off-by: Tomas Vanek Reviewed-on: https://review.openocd.org/c/openocd/+/6970 Tested-by: jenkins Reviewed-by: Antonio Borneo --- diff --git a/src/target/target.c b/src/target/target.c index d2dff111a5..8a451883ba 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -6477,7 +6477,7 @@ static int jim_target_smp(Jim_Interp *interp, int argc, Jim_Obj *const *argv) } if (target && target->rtos) - retval = rtos_smp_init(head->target); + retval = rtos_smp_init(target); return retval; }