This is an automated email from the ASF dual-hosted git repository.
pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 599d41d806 greenhills: fix the pointless comparison build warning
599d41d806 is described below
commit 599d41d80673ccda25c1a946bb5e436db509b18a
Author: guoshichao <[email protected]>
AuthorDate: Wed Jul 24 11:02:17 2024 +0800
greenhills: fix the pointless comparison build warning
"ioexpander/gpio.c", line 529: warning #186-D: pointless comparison of
unsigned integer with zero
if (pintype < GPIO_INPUT_PIN || pintype >= GPIO_NPINTYPES)
^
Signed-off-by: guoshichao <[email protected]>
---
drivers/ioexpander/gpio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ioexpander/gpio.c b/drivers/ioexpander/gpio.c
index c653ccbf4d..5c5fbc767b 100644
--- a/drivers/ioexpander/gpio.c
+++ b/drivers/ioexpander/gpio.c
@@ -464,7 +464,7 @@ static int gpio_ioctl(FAR struct file *filep, int cmd,
unsigned long arg)
/* Check if the argument is a valid pintype */
- if (pintype < GPIO_INPUT_PIN || pintype >= GPIO_NPINTYPES)
+ if (pintype >= GPIO_NPINTYPES)
{
ret = -EINVAL;
break;