Skip to content

Commit 20d7415

Browse files
committed
validation: sched: fix coverity warnings
Add missing function return value checks and remove dead code. Signed-off-by: Matias Elo <[email protected]> Reviewed-by: Tuomas Taipale <[email protected]>
1 parent e521dec commit 20d7415

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

test/validation/api/scheduler/scheduler.c

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,9 +1222,9 @@ static void scheduler_test_groups(void)
12221222
j = 0;
12231223

12241224
/* Ensure that each test run starts from mygrp1 */
1225-
odp_schedule_group_leave(mygrp1, &mymask);
1226-
odp_schedule_group_leave(mygrp2, &mymask);
1227-
odp_schedule_group_join(mygrp1, &mymask);
1225+
CU_ASSERT_FATAL(odp_schedule_group_leave(mygrp1, &mymask) == 0);
1226+
CU_ASSERT_FATAL(odp_schedule_group_leave(mygrp2, &mymask) == 0);
1227+
CU_ASSERT_FATAL(odp_schedule_group_join(mygrp1, &mymask) == 0);
12281228

12291229
wait_time = odp_schedule_wait_time(ODP_TIME_MSEC_IN_NS);
12301230
schedule_retries = 0;
@@ -1272,11 +1272,11 @@ static void scheduler_test_groups(void)
12721272
}
12731273

12741274
/* Release scheduler context and leave groups */
1275-
odp_schedule_group_join(mygrp1, &mymask);
1276-
odp_schedule_group_join(mygrp2, &mymask);
1275+
CU_ASSERT_FATAL(odp_schedule_group_join(mygrp1, &mymask) == 0);
1276+
CU_ASSERT_FATAL(odp_schedule_group_join(mygrp2, &mymask) == 0);
12771277
CU_ASSERT(drain_queues() == 0);
1278-
odp_schedule_group_leave(mygrp1, &mymask);
1279-
odp_schedule_group_leave(mygrp2, &mymask);
1278+
CU_ASSERT_FATAL(odp_schedule_group_leave(mygrp1, &mymask) == 0);
1279+
CU_ASSERT_FATAL(odp_schedule_group_leave(mygrp2, &mymask) == 0);
12801280

12811281
/* Done with queues for this round */
12821282
CU_ASSERT_FATAL(odp_queue_destroy(queue_grp1) == 0);
@@ -1698,9 +1698,6 @@ static int schedule_common_(void *arg)
16981698
/* Clear scheduler atomic / ordered context between tests */
16991699
CU_ASSERT(drain_queues() == 0);
17001700

1701-
if (num)
1702-
printf("\nDROPPED %i events\n\n", num);
1703-
17041701
return 0;
17051702
}
17061703

0 commit comments

Comments
 (0)