This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit cd958831d8ed7563de05ce2d4accebb78188c012 Author: fangxinyong <[email protected]> AuthorDate: Sun Sep 28 21:34:43 2025 +0800 sched/init: use enum type for g_nx_initstate Change g_nx_initstate type from uint8_t to enum nx_initstate_e. Avoid enum/integer base-type mismatch in init state comparisons. Satisfies MISRA C:2012 Rule 10.4 without behavior change. Signed-off-by: fangxinyong <[email protected]> --- include/nuttx/init.h | 2 +- sched/init/nx_start.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/nuttx/init.h b/include/nuttx/init.h index 697c509112e..f54a4f9dce3 100644 --- a/include/nuttx/init.h +++ b/include/nuttx/init.h @@ -93,7 +93,7 @@ extern "C" * hardware resources may not yet be available to the OS-internal logic. */ -EXTERN volatile uint8_t g_nx_initstate; /* See enum nx_initstate_e */ +EXTERN volatile enum nx_initstate_e g_nx_initstate; /* See enum nx_initstate_e */ /**************************************************************************** * Public Function Prototypes diff --git a/sched/init/nx_start.c b/sched/init/nx_start.c index 1c7b931b050..01ef285b901 100644 --- a/sched/init/nx_start.c +++ b/sched/init/nx_start.c @@ -185,7 +185,7 @@ struct tasklist_s g_tasklisttable[NUM_TASK_STATES]; * hardware resources may not yet be available to the kernel logic. */ -volatile uint8_t g_nx_initstate; /* See enum nx_initstate_e */ +volatile enum nx_initstate_e g_nx_initstate; /* See enum nx_initstate_e */ /* This is an array of task control block (TCB) for the IDLE thread of each * CPU. For the non-SMP case, this is a a single TCB; For the SMP case,
