Hi,

On Wed, Dec 7, 2016 at 8:37 PM, Luca Barbato <[email protected]> wrote:
> On 03/12/2016 01:56, Wan-Teh Chang wrote:
>> The Solaris and Windows emulations of atomic_compare_exchange_strong()
>> need typecasts to avoid compiler warnings, because the functions they
>> call expect a void* pointer but an intptr_t integer is passed.
>>
>> Note that the emulations of atomic_compare_exchange_strong() (except
>> the gcc version) only work for atomic_intptr_t because of the type of
>> the second argument (|expected|). See
>> http://en.cppreference.com/w/c/atomic:
>>
>> _Bool atomic_compare_exchange_strong( volatile A* obj,
>>                                       C* expected, C desired );
>>
>> The types of the first argument and second argument are different
>> (|A| and |C|, respectively). |C| is the non-atomic type corresponding
>> to |A|. In the emulations of atomic_compare_exchange_strong(), |C| is
>> intptr_t. This implies |A| can only be sig_intptr_t.
>>
>> Signed-off-by: Wan-Teh Chang <[email protected]>
>> ---
>>  compat/atomics/suncc/stdatomic.h | 2 +-
>>  compat/atomics/win32/stdatomic.h | 3 ++-
>>  2 files changed, 3 insertions(+), 2 deletions(-)
>>
>
> Possibly won't hurt, Sean can you confirm with suncc ?
>
> lu
>

Looks good over here on Solaris Studio 12.3.

Thanks, Wan-Teh!

-- Sean McG.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to