kernel: fix XCC compilation with k_poll event initializer

XCC (which is based on GCC 4.2) needs the initializer of
one of the union elements to be enclosed in brackets.
So add them.

Fixes #33549

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2021-03-24 12:45:01 -07:00 committed by Kumar Gala
parent 7c4b13c583
commit 087fb9430d
1 changed files with 6 additions and 2 deletions

View File

@ -5228,7 +5228,9 @@ struct k_poll_event {
.state = K_POLL_STATE_NOT_READY, \
.mode = _event_mode, \
.unused = 0, \
.obj = _event_obj, \
{ \
.obj = _event_obj, \
}, \
}
#define K_POLL_EVENT_STATIC_INITIALIZER(_event_type, _event_mode, _event_obj, \
@ -5239,7 +5241,9 @@ struct k_poll_event {
.state = K_POLL_STATE_NOT_READY, \
.mode = _event_mode, \
.unused = 0, \
.obj = _event_obj, \
{ \
.obj = _event_obj, \
}, \
}
/**