From 1edff9e37e481939b17b13151c211558ef56012c Mon Sep 17 00:00:00 2001 From: fangpeina Date: Tue, 18 Nov 2025 23:02:58 +0800 Subject: [PATCH] system/nxinit: fix uninitialized 'wstatus' warning reap_process() referenced an undeclared identifier 'wtatus' on the WIFSIGNALED branch (typo of 'wstatus'). Some toolchains then flagged a -Wmaybe-uninitialized on the surrounding wstatus use. Correct the typo so WIFSIGNALED/WTERMSIG operate on the actual wstatus value returned by waitpid(). Signed-off-by: fangpeina --- system/nxinit/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/nxinit/init.c b/system/nxinit/init.c index 1a542f796..978b8a63b 100644 --- a/system/nxinit/init.c +++ b/system/nxinit/init.c @@ -90,7 +90,7 @@ static void reap_process(FAR struct service_manager_s *sm, status = "status"; ret = WEXITSTATUS(wstatus); } - else if (WIFSIGNALED(wtatus)) + else if (WIFSIGNALED(wstatus)) { status = "signal"; ret = WTERMSIG(wstatus);