From 188d3bfe4a0ac36b119a2cee35a6be8d0c68e09e Mon Sep 17 00:00:00 2001 From: John Cox Date: Wed, 24 Jun 2020 11:57:58 +0100 Subject: [PATCH] Fix cast warning on vcos_llthread_current MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Current header generates warnings of the form "warning: cast from function call of type ‘pthread_t’ {aka ‘long unsigned int’} to non-matching type ‘VCOS_LLTHREAD_T *’ {aka ‘struct VCOS_LLTHREAD_T *’} [-Wbad-function-cast]". Fix that. --- interface/vcos/pthreads/vcos_platform.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/vcos/pthreads/vcos_platform.h b/interface/vcos/pthreads/vcos_platform.h index ba64e16cd..509f53401 100644 --- a/interface/vcos/pthreads/vcos_platform.h +++ b/interface/vcos/pthreads/vcos_platform.h @@ -447,7 +447,7 @@ void vcos_thread_attr_setautostart(VCOS_THREAD_ATTR_T *attrs, VCOS_UNSIGNED auto VCOS_INLINE_IMPL VCOS_LLTHREAD_T *vcos_llthread_current(void) { - return (VCOS_LLTHREAD_T *)pthread_self(); + return (VCOS_LLTHREAD_T *)(uintptr_t)pthread_self(); } VCOS_INLINE_IMPL