TT#111150 Use volatile in cast

The function argument where the cast is applied is volatile void *,
use the same type on the cast.

Change-Id: I2e39c433962df4f31ff8cad4d7561d358e94928a
Warned-by: clang-12
pull/1262/head
Guillem Jover 5 years ago
parent 320459873f
commit 87e83467cd

@ -380,7 +380,7 @@ INLINE uint64_t atomic64_get_set(atomic64 *u, uint64_t a) {
uint64_t old;
do {
old = atomic64_get(u);
if (g_atomic_pointer_compare_and_exchange(&u->p, (void *) old, (void *) a))
if (g_atomic_pointer_compare_and_exchange(&u->p, (volatile void *) old, (void *) a))
return old;
} while (1);
}

Loading…
Cancel
Save