diff --git a/sched/sched/sched_note.c b/sched/sched/sched_note.c index e4900554b2d..d41c214fae3 100644 --- a/sched/sched/sched_note.c +++ b/sched/sched/sched_note.c @@ -431,8 +431,8 @@ static void note_spincommon(FAR struct tcb_s *tcb, note_common(tcb, ¬e.nsp_cmn, sizeof(struct note_spinlock_s), type); - sched_note_flatten(note.nsp_spinlock, &spinlock, sizeof(spilock)); - note.nsp_value = (uint8_t)*spinlock; + sched_note_flatten(note.nsp_spinlock, &spinlock, sizeof(spinlock)); + note.nsp_value = *(uint8_t *)spinlock; /* Add the note to circular buffer */