Fix cast warning on vcos_llthread_current

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.
This commit is contained in:
John Cox
2020-06-24 11:57:58 +01:00
committed by popcornmix
parent f97b1af1b3
commit 188d3bfe4a

View File

@@ -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