<h3>Contribution description</h3>
<p>Unstructured static initializers of the form { 0 } lead to compilation errors on ESP8266, MSP430 and MIPS platforms. Therefore, the following compilation errors occur when  <code>EVENT_QUEUE_INIT_DETACHED</code> is used for initialization of event queues.</p>
<pre><code>error: (near initialization for 'queue.event_list') [-Werror=missing-braces]
error: (near initialization for 'queue.waiter') [-Werror=missing-field-initializers]
</code></pre>
<p>This PR fixes the compilation problem.</p>
<h3>Testing procedure</h3>
<p>Use a very small test program and try to compile something with the static initializer <code>EVENT_QUEUE_INIT_DETACHED</code>.</p>
<p><code>main.c</code>:</p>
<div class="highlight highlight-source-c"><pre>#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">"</span>event.h<span class="pl-pds">"</span></span>

<span class="pl-k">static</span> <span class="pl-c1">event_queue_t</span> queue = EVENT_QUEUE_INIT_DETACHED;

<span class="pl-k">int</span> <span class="pl-en">main</span>(<span class="pl-k">void</span>)
{
    <span class="pl-c1">event_queue_claim</span>(&queue);
    <span class="pl-k">return</span> <span class="pl-c1">0</span>;
}</pre></div>
<p><code>Makefile</code>:</p>
<div class="highlight highlight-source-makefile"><pre><span class="pl-k">include</span> ../Makefile.tests_common

<span class="pl-smi">USEMODULE</span> += event

<span class="pl-k">include</span> <span class="pl-s">$(<span class="pl-smi">RIOTBASE</span>)</span>/Makefile.include</pre></div>
<h3>Issues/PRs references</h3>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/RIOT-OS/RIOT/pull/11928'>https://github.com/RIOT-OS/RIOT/pull/11928</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>sys/event: fix of compilation problems</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11928/files#diff-0">sys/include/event.h</a>
    (2)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/11928.patch'>https://github.com/RIOT-OS/RIOT/pull/11928.patch</a></li>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/11928.diff'>https://github.com/RIOT-OS/RIOT/pull/11928.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/11928?email_source=notifications&email_token=ABE7WYAWT7EKS27OZVC7ZY3QB3GUBA5CNFSM4IHRLCQKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HCASGUQ">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYFPWKY67BZW7XYGAHDQB3GUBANCNFSM4IHRLCQA">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYAHG7AWFXFMB3R6IFTQB3GUBA5CNFSM4IHRLCQKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HCASGUQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/11928?email_source=notifications\u0026email_token=ABE7WYAWT7EKS27OZVC7ZY3QB3GUBA5CNFSM4IHRLCQKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HCASGUQ",
"url": "https://github.com/RIOT-OS/RIOT/pull/11928?email_source=notifications\u0026email_token=ABE7WYAWT7EKS27OZVC7ZY3QB3GUBA5CNFSM4IHRLCQKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HCASGUQ",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>