Skip to content

Commit

Permalink
kernel: fix XCC compilation with k_poll event initializer
Browse files Browse the repository at this point in the history
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 zephyrproject-rtos#33549

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
  • Loading branch information
dcpleung committed Mar 24, 2021
1 parent e11bf55 commit 7348cb5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions include/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -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, \
Expand All @@ -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, \
}, \
}

/**
Expand Down

0 comments on commit 7348cb5

Please sign in to comment.