[vlc-commits] [Git][videolan/vlc][master] emscripten: add cast for pthread_self()

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Oct 6 12:11:35 UTC 2022



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
88a2a599 by Steve Lhomme at 2022-10-06T11:51:29+00:00
emscripten: add cast for pthread_self()

This commit avoids an implicit cast from pthread_t * to unsigned long.

- - - - -


1 changed file:

- src/emscripten/thread.c


Changes:

=====================================
src/emscripten/thread.c
=====================================
@@ -22,11 +22,13 @@
 # include "config.h"
 #endif
 
+#include <vlc_common.h>
+#include <vlc_threads.h>
 #include <pthread.h>
 #include <assert.h>
 
 unsigned long vlc_thread_id(void)
 {
     static_assert(sizeof(pthread_t) <= sizeof(unsigned long),"invalid pthread_t size");
-    return pthread_self();
+    return (uintptr_t)(void *)pthread_self();
 }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/88a2a59950e09a7fd09eb6061603187c7a4bf18b

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/88a2a59950e09a7fd09eb6061603187c7a4bf18b
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list