diff options
author | Andy Hung <hunga@google.com> | 2024-02-14 12:08:39 -0800 |
---|---|---|
committer | Andy Hung <hunga@google.com> | 2024-02-15 12:44:01 -0800 |
commit | 412962101fd4f2b37ee41c2179b5ade0914d9db4 (patch) | |
tree | f61341b1edb9d78059fdfe22670aa0808f3f5bea | |
parent | 3a22ade5374d5f202af043b4b3857fdb53b8bb8b (diff) | |
download | wilhelm-412962101fd4f2b37ee41c2179b5ade0914d9db4.tar.gz |
OpenSLES: Fix deprecated volatile op warning
Test: compiles
Bug: 324511705
Merged-In: I201f3fc2a66a45ade9f6501f1ab90f5963223cd1
Change-Id: I201f3fc2a66a45ade9f6501f1ab90f5963223cd1
-rw-r--r-- | src/locks.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/locks.cpp b/src/locks.cpp index 44128eb..f3edd33 100644 --- a/src/locks.cpp +++ b/src/locks.cpp @@ -117,7 +117,8 @@ forward_progress: thiz->mFile = file; thiz->mLine = line; // not android_atomic_inc because we are already holding a mutex - ++thiz->mGeneration; + // use explicit add as mGeneration is a volatile for which ++v and v += are deprecated. + thiz->mGeneration = thiz->mGeneration + 1; } #else void object_lock_exclusive(IObject *thiz) |