mirror of https://github.com/FreeRDP/FreeRDP
Fixed clang pragma
This commit is contained in:
parent
436e65acc9
commit
ab90ddc781
|
@ -222,11 +222,15 @@ USHORT QueryDepthSList(WINPR_PSLIST_HEADER ListHead)
|
|||
|
||||
LONG InterlockedIncrement(LONG volatile* Addend)
|
||||
{
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Watomic-implicit-seq-cst"
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Watomic-implicit-seq-cst"
|
||||
#endif
|
||||
return __sync_add_and_fetch(Addend, 1);
|
||||
#pragma GCC diagnostic pop
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
|
@ -234,11 +238,15 @@ LONG InterlockedIncrement(LONG volatile* Addend)
|
|||
|
||||
LONG InterlockedDecrement(LONG volatile* Addend)
|
||||
{
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Watomic-implicit-seq-cst"
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Watomic-implicit-seq-cst"
|
||||
#endif
|
||||
return __sync_sub_and_fetch(Addend, 1);
|
||||
#pragma GCC diagnostic pop
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
|
@ -246,10 +254,15 @@ LONG InterlockedDecrement(LONG volatile* Addend)
|
|||
|
||||
LONG InterlockedExchange(LONG volatile* Target, LONG Value)
|
||||
{
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Watomic-implicit-seq-cst"
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Watomic-implicit-seq-cst"
|
||||
#endif
|
||||
return __sync_val_compare_and_swap(Target, *Target, Value);
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
|
@ -257,11 +270,15 @@ LONG InterlockedExchange(LONG volatile* Target, LONG Value)
|
|||
|
||||
LONG InterlockedExchangeAdd(LONG volatile* Addend, LONG Value)
|
||||
{
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Watomic-implicit-seq-cst"
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Watomic-implicit-seq-cst"
|
||||
#endif
|
||||
return __sync_fetch_and_add(Addend, Value);
|
||||
#pragma GCC diagnostic pop
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
|
@ -269,11 +286,15 @@ LONG InterlockedExchangeAdd(LONG volatile* Addend, LONG Value)
|
|||
|
||||
LONG InterlockedCompareExchange(LONG volatile* Destination, LONG Exchange, LONG Comperand)
|
||||
{
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Watomic-implicit-seq-cst"
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Watomic-implicit-seq-cst"
|
||||
#endif
|
||||
return __sync_val_compare_and_swap(Destination, Comperand, Exchange);
|
||||
#pragma GCC diagnostic pop
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
|
@ -282,11 +303,15 @@ LONG InterlockedCompareExchange(LONG volatile* Destination, LONG Exchange, LONG
|
|||
PVOID InterlockedCompareExchangePointer(PVOID volatile* Destination, PVOID Exchange,
|
||||
PVOID Comperand)
|
||||
{
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Watomic-implicit-seq-cst"
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Watomic-implicit-seq-cst"
|
||||
#endif
|
||||
return __sync_val_compare_and_swap(Destination, Comperand, Exchange);
|
||||
#pragma GCC diagnostic pop
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
|
@ -366,11 +391,15 @@ LONGLONG InterlockedCompareExchange64(LONGLONG volatile* Destination, LONGLONG E
|
|||
LONGLONG InterlockedCompareExchange64(LONGLONG volatile* Destination, LONGLONG Exchange,
|
||||
LONGLONG Comperand)
|
||||
{
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Watomic-implicit-seq-cst"
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Watomic-implicit-seq-cst"
|
||||
#endif
|
||||
return __sync_val_compare_and_swap(Destination, Comperand, Exchange);
|
||||
#pragma GCC diagnostic pop
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue