error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
Here's the non working part, can anyone tell me what's wrong?
- Code: Select all
#ifndef compare_exchange_ptr
INLINE void *compare_exchange_ptr(void * volatile *ptr, void *compare, void *exchange)
{
#ifdef PTR64
INT64 result;
result = compare_exchange64((INT64 volatile *)ptr, (INT64)compare, (INT64)exchange);
#else
INT32 result;
result = compare_exchange32((INT32 volatile *)ptr, (INT32)compare, (INT32)exchange);
#endif
return (void *)result;
}
#endif
Here I bolded the exact character places it reports in red
#ifndef compare_exchange_ptr
INLINE void *compare_exchange_ptr(void * volatile *ptr, void *compare, void *exchange)
{
#ifdef PTR64
INT64 result;
result = compare_exchange64((INT64 volatile *)ptr, (INT64)compare, (INT64)exchange);
#else
INT32 result;
result = compare_exchange32((INT32 volatile *)ptr, (INT32)compare, (INT32)exchange);
#endif
return (void *)result;
}
#endif


