From 6893843cc516bd211b4da257a2d86e831024ee56 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 21 Mar 2017 13:47:56 -0600 Subject: [PATCH] sched/semaphore: Fix a warning aout an unused variable when priority inheritance is enabled. --- sched/semaphore/sem_holder.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sched/semaphore/sem_holder.c b/sched/semaphore/sem_holder.c index a9159c1537..a46cf3a8be 100644 --- a/sched/semaphore/sem_holder.c +++ b/sched/semaphore/sem_holder.c @@ -787,7 +787,6 @@ static inline void sem_restorebaseprio_task(FAR struct tcb_s *stcb, FAR sem_t *sem) { FAR struct tcb_s *rtcb = this_task(); - FAR struct semholder_s *pholder; /* Perform the following actions only if a new thread was given a count. * The thread that received the count should be the highest priority @@ -831,7 +830,6 @@ static inline void sem_restorebaseprio_task(FAR struct tcb_s *stcb, */ sem_findandfreeholder(sem, rtcb); - } /**************************************************************************** @@ -908,6 +906,7 @@ void sem_destroyholder(FAR sem_t *sem) DEBUGPANIC(); (void)sem_foreachholder(sem, sem_recoverholders, NULL); } + #else if (sem->holder[0].htcb != NULL || sem->holder[1].htcb != NULL) {