-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Labels
area: Hardware SpinlockbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bugLow impact/importance bug
Description
Describe the bug
A build warning occurs in the hardware spinlock driver context initializer, HWSPINLOCK_CTX_INITIALIZER when struct k_spinlock has no members. This happens with the following Kconfig settings:
CONFIG_SMP=n
CONFIG_SPIN_VALIDATE=n
CONFIG_CPP=n
Regression
- This is a regression.
Steps to reproduce
The issue was observed on an out-of-tree Arm Cortex-M board. Unfortunately there are no in-tree usages of HWSPINLOCK_CTX_INITIALIZER, so it currently isn't possible to reproduce upstream.
Relevant log output
In file included from /home/mhelm/zephyrproject/zephyr/include/zephyr/sys/util_macro.h:34,
from /home/mhelm/zephyrproject/zephyr/include/zephyr/sys/util.h:17,
from /home/mhelm/zephyrproject/zephyr/include/zephyr/sys/atomic.h:18,
from /home/mhelm/zephyrproject/zephyr/include/zephyr/kernel_includes.h:25,
from /home/mhelm/zephyrproject/zephyr/include/zephyr/kernel.h:17,
<snip>
/home/mhelm/zephyrproject/zephyr/include/zephyr/drivers/hwspinlock.h:76:26: warning: excess elements in struct initializer
76 | .lock = {0}, \
| ^Impact
Annoyance – Minor irritation; no significant impact on usability or functionality.
Environment
- OS: Linux
- Toolchain: zephyr-sdk-0.17.4
- Tag: v4.3.0-rc2
Additional Context
No response
Metadata
Metadata
Assignees
Labels
area: Hardware SpinlockbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bugLow impact/importance bug