Skip to content

Commit

Permalink
Fix cast warning on vcos_llthread_current
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jc-kynesim authored and popcornmix committed Jun 26, 2020
1 parent f97b1af commit 188d3bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion interface/vcos/pthreads/vcos_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 188d3bf

Please sign in to comment.