@@ -2214,7 +2214,7 @@ nc_recv_notif_thread(void *arg)
22142214 free (ntarg );
22152215
22162216 /* remember our allocated tid, we will be freeing it */
2217- ntf_tid = ATOMIC_LOAD (session -> opts .client .ntf_tid );
2217+ ntf_tid = ( pthread_t * ) ATOMIC_LOAD (session -> opts .client .ntf_tid );
22182218
22192219 while (ATOMIC_LOAD (session -> opts .client .ntf_tid )) {
22202220 msgtype = nc_recv_notif (session , NC_CLIENT_NOTIF_THREAD_SLEEP / 1000 , & notif );
@@ -2235,7 +2235,7 @@ nc_recv_notif_thread(void *arg)
22352235 }
22362236
22372237 VRB ("Session %u: notification thread exit." , session -> id );
2238- ATOMIC_STORE (session -> opts .client .ntf_tid , NULL );
2238+ ATOMIC_STORE (session -> opts .client .ntf_tid , ( uintptr_t ) NULL );
22392239 free (ntf_tid );
22402240 return NULL ;
22412241}
@@ -2276,14 +2276,14 @@ nc_recv_notif_dispatch(struct nc_session *session, void (*notif_clb)(struct nc_s
22762276 return -1 ;
22772277 }
22782278 /* just so that nc_recv_notif_thread() does not immediately exit, the value does not matter */
2279- ATOMIC_STORE (session -> opts .client .ntf_tid , tid );
2279+ ATOMIC_STORE (session -> opts .client .ntf_tid , ( uintptr_t ) tid );
22802280
22812281 ret = pthread_create (tid , NULL , nc_recv_notif_thread , ntarg );
22822282 if (ret ) {
22832283 ERR ("Session %u: failed to create a new thread (%s)." , strerror (errno ));
22842284 free (ntarg );
22852285 free (tid );
2286- ATOMIC_STORE (session -> opts .client .ntf_tid , NULL );
2286+ ATOMIC_STORE (session -> opts .client .ntf_tid , ( uintptr_t ) NULL );
22872287 return -1 ;
22882288 }
22892289
0 commit comments