aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJere Leppänen <jere.leppanen@nokia.com>2023-05-26 17:25:09 +0300
committerPetri Savolainen <petri.savolainen@nokia.com>2023-06-01 10:15:10 +0300
commit09cd7cc9e54c7c838f7e1e3e02476b37616bf6ec (patch)
tree1002e649d18bab5b66c79c45d0455eb206796b18 /test
parent0bc32da83bc4f7316ce8cc8379c657b9c2df99d1 (diff)
validation: time: fix coverity warning "Incorrect expression (ASSERT_SIDE_EFFECT)"
Fix coverity warning CID 408074: Incorrect expression (ASSERT_SIDE_EFFECT). In coverity's opinion, CU_ASSERT*() must not contain any side effects, because this could result in different behavior in debug vs. non-debug builds. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'test')
-rw-r--r--test/validation/api/time/time.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/validation/api/time/time.c b/test/validation/api/time/time.c
index b00d788a0..175234f50 100644
--- a/test/validation/api/time/time.c
+++ b/test/validation/api/time/time.c
@@ -731,8 +731,9 @@ static void time_test_global_sync(void)
odp_cpumask_set(&cpumask_one, cpu);
thr_common.cpumask = &cpumask_one;
- CU_ASSERT_FATAL(odph_thread_create(&thread_tbl[thr++],
- &thr_common, &thr_param, 1) == 1);
+ int r = odph_thread_create(&thread_tbl[thr++],
+ &thr_common, &thr_param, 1);
+ CU_ASSERT_FATAL(r == 1);
/*
* Delay for more than the tolerance, so that we notice if the