Skip to content

Commit f6b3e92

Browse files
yanghuataoxiaoxiang781216
authored andcommitted
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 <yanghuatao@xiaomi.com>
1 parent f44232b commit f6b3e92

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

sched/sched/sched_removeblocked.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656
void nxsched_remove_blocked(FAR struct tcb_s *btcb)
5757
{
58-
tstate_t task_state = btcb->task_state;
58+
tstate_t task_state = (tstate_t)btcb->task_state;
5959

6060
/* Make sure the TCB is in a valid blocked state */
6161

sched/sched/sched_setpriority.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ static inline void nxsched_blocked_setpriority(FAR struct tcb_s *tcb,
312312
int sched_priority)
313313
{
314314
FAR dq_queue_t *tasklist;
315-
tstate_t task_state = tcb->task_state;
315+
tstate_t task_state = (tstate_t)tcb->task_state;
316316

317317
/* CASE 3a. The task resides in a prioritized list. */
318318

0 commit comments

Comments
 (0)