Rewrite the code by adding an additional cast to avoid new warning with GCC8.

This commit is contained in:
Patrick Pelissier committed 2018-04-25 22:03:52 +02:00
1 parent 15566b4b65
commit a39c4ba9a4
1 file changed
+2 -2
+2 -2
View File
@@ -94,7 +94,7 @@ static inline void m_cond_wait(m_cond_t c, m_mutex_t m)
static inline void m_thread_create(m_thread_t t, void (*func)(void*), void* arg)
{
int rc = thrd_create(t, ((int)(*)(void*))func, arg);
int rc = thrd_create(t, (int(*)(void*))(void(*)(void))func, arg);
M_ASSERT_INIT (rc == thrd_success);
}
@@ -274,7 +274,7 @@ static inline void m_cond_wait(m_cond_t c, m_mutex_t m)
static inline void m_thread_create(m_thread_t t, void (*func)(void*), void *arg)
{
int _rc = pthread_create(t, NULL, (void*(*)(void*))func, arg);
int _rc = pthread_create(t, NULL, (void*(*)(void*))(void(*)(void))func, arg);
M_ASSERT_INIT (_rc == 0);
}