pkarashchenko commented on code in PR #6226:
URL: https://github.com/apache/incubator-nuttx/pull/6226#discussion_r872986133
##########
sched/semaphore/sem_tickwait.c:
##########
@@ -165,19 +145,27 @@ int nxsem_tickwait(FAR sem_t *sem, clock_t start,
uint32_t delay)
*
****************************************************************************/
-int nxsem_tickwait_uninterruptible(FAR sem_t *sem, clock_t start,
- uint32_t delay)
+int nxsem_tickwait_uninterruptible(FAR sem_t *sem, uint32_t delay)
{
+ clock_t end = clock_systime_ticks() + delay;
int ret;
- do
+ for (; ; )
{
/* Take the semaphore (perhaps waiting) */
- ret = nxsem_tickwait(sem, start, delay);
+ int ret = nxsem_tickwait(sem, delay);
Review Comment:
```suggestion
ret = nxsem_tickwait(sem, delay);
```
to fix
```
Error: semaphore/sem_tickwait.c:157:11: error: declaration of 'ret' shadows
a previous local [-Werror=shadow]
int ret = nxsem_tickwait(sem, delay);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]