diff options
author | Chris Robinson <[email protected]> | 2014-07-23 06:36:34 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-07-23 06:36:34 -0700 |
commit | a3dbe08c8b9df301dded52ad78f655c2753be56c (patch) | |
tree | 69e5d4fd8f3a195bfae430d9a9a5dedf660509f7 /OpenAL32 | |
parent | e4b779c492e9ffbfce806ac49acae66ab264a7da (diff) |
Support C11 atomics
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/alError.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/OpenAL32/alError.c b/OpenAL32/alError.c index 04700d97..6d3870fd 100644 --- a/OpenAL32/alError.c +++ b/OpenAL32/alError.c @@ -35,6 +35,7 @@ ALboolean TrapALError = AL_FALSE; ALvoid alSetError(ALCcontext *Context, ALenum errorCode) { + ALenum curerr = AL_NO_ERROR; if(TrapALError) { #ifdef _WIN32 @@ -45,7 +46,7 @@ ALvoid alSetError(ALCcontext *Context, ALenum errorCode) raise(SIGTRAP); #endif } - ATOMIC_COMPARE_EXCHANGE(ALenum, Context->LastError, AL_NO_ERROR, errorCode); + (void)ATOMIC_COMPARE_EXCHANGE(ALenum, Context->LastError, curerr, errorCode); } AL_API ALenum AL_APIENTRY alGetError(void) |