aboutsummaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorBill Fischofer <bill.fischofer@linaro.org>2016-07-04 21:31:45 -0500
committerMaxim Uvarov <maxim.uvarov@linaro.org>2016-07-05 15:03:35 +0300
commitc03685af2895b20a5e8a046ea910254a96ab15c4 (patch)
treefb2f27b3bcd88bedaa2af8f4ecdb0c8e1aa6031d /platform
parentc6bf23e2794ec2a54fa1724cd9d833d84aa39270 (diff)
linux-generic: schedule: simplify wait logic to avoid clang issues
Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2387 by ensuring that t1 variable is seen as initialized in all paths in the SP Scheduler. Previous logic failed due to an apparent issue with clang. Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform')
-rw-r--r--platform/linux-generic/odp_schedule_sp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/platform/linux-generic/odp_schedule_sp.c b/platform/linux-generic/odp_schedule_sp.c
index 8c4512301..2e28aa4da 100644
--- a/platform/linux-generic/odp_schedule_sp.c
+++ b/platform/linux-generic/odp_schedule_sp.c
@@ -364,9 +364,9 @@ static uint64_t schedule_wait_time(uint64_t ns)
}
static int schedule_multi(odp_queue_t *from, uint64_t wait,
- odp_event_t events[], int max_events)
+ odp_event_t events[], int max_events ODP_UNUSED)
{
- (void)max_events;
+ odp_time_t t1;
int update_t1 = 1;
if (sched_local.cmd) {
@@ -384,7 +384,6 @@ static int schedule_multi(odp_queue_t *from, uint64_t wait,
sched_cmd_t *cmd;
uint32_t qi;
int num;
- odp_time_t t1;
cmd = sched_cmd(NUM_PRIO);