fix(linux): Fix warnings for Linux target when COMPILER_STATIC_ANALYZER=y

This commit is contained in:
Konstantin Kondrashov
2024-06-27 15:19:26 +03:00
parent 97f26e99d1
commit 0bdf675992
3 changed files with 8 additions and 3 deletions

View File

@@ -34,6 +34,7 @@
#include <pthread.h>
#include <stdlib.h>
#include <errno.h>
#include <assert.h>
#include "wait_for_event.h"
@@ -47,7 +48,7 @@ struct event
struct event * event_create(void)
{
struct event * ev = malloc( sizeof( struct event ) );
assert(ev != NULL);
ev->event_triggered = false;
pthread_mutex_init( &ev->mutex, NULL );
pthread_cond_init( &ev->cond, NULL );