[riot-notifications] [RIOT-OS/RIOT] sys/event: fix of compilation problems (#11928)

Gunar Schorcht notifications at github.com
Mon Jul 29 13:17:20 CEST 2019

### Contribution description

Unstructured static initializers of the form { 0 } lead to compilation errors on ESP8266, MSP430 and MIPS platforms. Therefore, the following compilation errors occur when  `EVENT_QUEUE_INIT_DETACHED` is used for initialization of event queues.
error: (near initialization for 'queue.event_list') [-Werror=missing-braces]
error: (near initialization for 'queue.waiter') [-Werror=missing-field-initializers]
This PR fixes the compilation problem.

### Testing procedure

Use a very small test program and try to compile something with the static initializer `EVENT_QUEUE_INIT_DETACHED`.

#include "event.h"

static event_queue_t queue = EVENT_QUEUE_INIT_DETACHED;

int main(void)
    return 0;
include ../Makefile.tests_common

USEMODULE += event

include $(RIOTBASE)/Makefile.include

### Issues/PRs references

You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * sys/event: fix of compilation problems

-- File Changes --

    M sys/include/event.h (2)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190729/afe03723/attachment.htm>

More information about the notifications mailing list