Commit 366930c tried to fix return of and taking in thread id, but doing it via unsigned int is still wrong and in fact does not get rid of the warnings completely as I see it here with Clang 19 and -Werror=pointer-to-int-cast -Werror=int-to-pointer-cast. I believe you should restore original and correct pthread_t in functions' signatures and apply the following patch:
@@ -1215,14 +1215,14 @@ start_timeout_func (Camera *camera, unsigned int timeo
pthread_create (&tid, NULL, thread_func, td);
- return (unsigned int)tid;
+ return (intptr_t)tid;
}
static void
stop_timeout_func (Camera __unused__ *camera, unsigned int id,
void __unused__ *data)
{
- pthread_t tid = (pthread_t)id;
+ pthread_t tid = (pthread_t)(intptr_t)id;
pthread_cancel (tid);
pthread_join (tid, NULL);
Commit 366930c tried to fix return of and taking in thread id, but doing it via
unsigned intis still wrong and in fact does not get rid of the warnings completely as I see it here with Clang 19 and-Werror=pointer-to-int-cast -Werror=int-to-pointer-cast. I believe you should restore original and correctpthread_tin functions' signatures and apply the following patch: