1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

core/sched: silence -Wcast-align

This commit is contained in:
Marian Buschsieweke 2021-11-05 21:41:43 +01:00
parent b7269c39e8
commit b9c07f9622
No known key found for this signature in database
GPG Key ID: CB8E3238CE715A94

View File

@ -120,7 +120,11 @@ static void _unschedule(thread_t *active_thread)
}
#if IS_ACTIVE(SCHED_TEST_STACK)
if (*((uintptr_t *)active_thread->stack_start) !=
/* All platforms align the stack to word boundaries (possible wasting one
* word of RAM), so this access is not unaligned. Using an intermediate
* cast to uintptr_t to silence -Wcast-align
*/
if (*((uintptr_t *)(uintptr_t)active_thread->stack_start) !=
(uintptr_t)active_thread->stack_start) {
LOG_WARNING(
"scheduler(): stack overflow detected, pid=%" PRIkernel_pid "\n",