From Coverity:
CID
1021642 (#1 of 3): Side effect in assertion
(ASSERT_SIDE_EFFECT)assert_side_effect: Argument test_array of assert()
has a side effect because the variable is volatile. The containing
function might work differently in a non-debug build.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
}
for (;;) {
+ int a;
+
pthread_rwlock_rdlock(&lock);
- assert(test_array.a == 8);
+ a = test_array.a;
+ assert(a == 8);
if (caa_unlikely(rduration))
loop_sleep(rduration);
pthread_rwlock_unlock(&lock);