zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
9.74k stars 6k forks source link

device.h: fix unbalanced initializer: ({ .pm_base = (pm_),)} #72202

Closed marc-hb closed 1 week ago

marc-hb commented 2 weeks ago

Close parentheses and braces in the reverse order they are opened.

Fixes commit f91d4731af4e ("pm: use braces for .pm_base inside anonymous union initializer")

I have no idea how no compiler caught this!?

I tested very carefully with two different gcc versions and one clang version and generated binaries are strictly identical before and after this commit. Fix the code anyway because C macros are painful enough to debug already, so no need to add more confusion.