diff --git a/sched/sched/sched_get_tls.c b/sched/sched/sched_get_tls.c index 63517429ed..02b64e61e8 100644 --- a/sched/sched/sched_get_tls.c +++ b/sched/sched/sched_get_tls.c @@ -73,5 +73,6 @@ FAR char **nxsched_get_stackargs(FAR struct tcb_s *tcb) { /* The args data follows the TLS data */ - return (FAR char**)(tcb->stack_alloc_ptr + nxsched_get_tls(tcb)->tl_size); + return (FAR char**)((FAR char *)tcb->stack_alloc_ptr + + nxsched_get_tls(tcb)->tl_size); } diff --git a/sched/signal/sig_timedwait.c b/sched/signal/sig_timedwait.c index 1b7985deeb..a831dd17a4 100644 --- a/sched/signal/sig_timedwait.c +++ b/sched/signal/sig_timedwait.c @@ -250,7 +250,7 @@ int nxsig_timedwait(FAR const sigset_t *set, FAR struct siginfo *info, irqstate_t flags; sclock_t waitticks; bool switch_needed; - siginfo_t sinfo; + siginfo_t unbinfo; int ret; DEBUGASSERT(set != NULL); @@ -318,7 +318,7 @@ int nxsig_timedwait(FAR const sigset_t *set, FAR struct siginfo *info, } #endif - rtcb->sigunbinfo = (info == NULL) ? &sinfo : info; + rtcb->sigunbinfo = (info == NULL) ? &unbinfo : info; /* Check if we should wait for the timeout */ diff --git a/sched/tls/tls_initinfo.c b/sched/tls/tls_initinfo.c index 67792004e4..306f00bbc3 100644 --- a/sched/tls/tls_initinfo.c +++ b/sched/tls/tls_initinfo.c @@ -65,7 +65,8 @@ int tls_init_info(FAR struct tcb_s *tcb) /* Derive tl_size w/o arch knowledge */ - info->tl_size = tcb->stack_base_ptr - tcb->stack_alloc_ptr; + info->tl_size = + (FAR char *)tcb->stack_base_ptr - (FAR char *)tcb->stack_alloc_ptr; /* Attach per-task info in group to TLS */