From f6b3e92b6c568c7a5ba9223a91d29cb690fa4bef Mon Sep 17 00:00:00 2001 From: yanghuatao Date: Tue, 23 Apr 2024 17:37:08 +0800 Subject: [PATCH] toolchain/ghs: Fix tstate_t "enumerated type mixed with another type" warnings "/mnt/yang/qixinwei_cmake/nuttx/sched/sched/sched_removeblocked.c", line 58: warning #188-D: enumerated type mixed with another type tstate_t task_state = btcb->task_state; "/mnt/yang/qixinwei_cmake/nuttx/sched/sched/sched_setpriority.c", line 243: warning #188-D: enumerated type mixed with another type tstate_t task_state = tcb->task_state; Signed-off-by: yanghuatao --- sched/sched/sched_removeblocked.c | 2 +- sched/sched/sched_setpriority.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sched/sched/sched_removeblocked.c b/sched/sched/sched_removeblocked.c index 74c597c36fe..203c281425a 100644 --- a/sched/sched/sched_removeblocked.c +++ b/sched/sched/sched_removeblocked.c @@ -55,7 +55,7 @@ void nxsched_remove_blocked(FAR struct tcb_s *btcb) { - tstate_t task_state = btcb->task_state; + tstate_t task_state = (tstate_t)btcb->task_state; /* Make sure the TCB is in a valid blocked state */ diff --git a/sched/sched/sched_setpriority.c b/sched/sched/sched_setpriority.c index abe031242b7..f90a24bf0a4 100644 --- a/sched/sched/sched_setpriority.c +++ b/sched/sched/sched_setpriority.c @@ -312,7 +312,7 @@ static inline void nxsched_blocked_setpriority(FAR struct tcb_s *tcb, int sched_priority) { FAR dq_queue_t *tasklist; - tstate_t task_state = tcb->task_state; + tstate_t task_state = (tstate_t)tcb->task_state; /* CASE 3a. The task resides in a prioritized list. */