-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
device: add braces around dev/dev_rw initializer #65912
device: add braces around dev/dev_rw initializer #65912
Conversation
5beeab0
to
530032f
Compare
dropped the init entry and inlined the whole initializer, fixed up a misaligned closing brace in the device one |
The init_entry struct got modified to add a union with a non const dev pointer in afc5911. Some old compiler (such as GCC 4) seems to require a pair of brackets to correctly initialize the field in the union. Add those brackets to the initializers in device.h and init.h to maintain compatibility. Signed-off-by: Fabio Baltieri <[email protected]>
530032f
to
cbd9a8a
Compare
no nevermind, that brace was in the right spot, put it back, sorry @gmarull :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix 😄
We should have @marc-hb test this before merging. Adding DNM for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes the compilation failure with gcc 4.2.0 reported in #62998, thanks for the very quick fix!
Good stuff, yeah it was interesting. :-) Let me just add all the tags I can think of and merge... |
153f38a
into
zephyrproject-rtos:main
Funny how this failure was re-introduced: |
See
The init_entry struct got modified to add a union with a non const dev pointer in afc5911. Some old compiler (such as GCC 4) seems to require a pair of brackets to correctly initialize the field in the union. Add those brackets to the initializers in device.h and init.h to maintain compatibility.