kernel: use designated initializers consistently

Use of the K_POLL_EVENT initializers in C++20 code causes a diagnostic
since C++ requires consistent use of designated initializers.  As the
initialized object is an anonymous union there is no member name to
use, but neither is one required.  Initialize the member without
wrapping it in braces as with an initializer list.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
This commit is contained in:
Peter A. Bigot 2020-04-26 12:30:58 -05:00 committed by Andrew Boie
commit 008f9c08a2

View file

@ -4948,7 +4948,7 @@ 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, \
@ -4959,7 +4959,7 @@ struct k_poll_event {
.state = K_POLL_STATE_NOT_READY, \
.mode = event_mode, \
.unused = 0, \
{ .obj = event_obj }, \
.obj = event_obj, \
}
/**