Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kernel: userspace: Fix address-of-packed-mem warning
The warning below appears once -Waddress-of-packed-mem is enabled: /home/carles/src/zephyr/zephyr/kernel/userspace.c: In function 'unref_check': /home/carles/src/zephyr/zephyr/kernel/userspace.c:471:28: warning: converting a packed 'struct z_object' pointer (alignment 4) to a 'struct dyn_obj' pointer (alignment 16) may result in an unaligned pointer value [-Waddress-of-packed-mem ber] 471 | CONTAINER_OF(ko, struct dyn_obj, kobj); To avoid the warning, use an intermediate void * variable. More info in zephyrproject-rtos#16587. Signed-off-by: Carles Cufi <[email protected]>
- Loading branch information