mirror of
https://github.com/linux-msm/cdba.git
synced 2026-02-25 13:11:56 -08:00
ftdi-gpio: fix -Wformat warning
Fixes:
ftdi-gpio.c: In function ‘ftdi_gpio_parse_config’:
ftdi-gpio.c:146:58: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘unsigned int’ [-Wformat=]
146 | errx(1, "GPIOs offset invalid: '%d'", gpio_offset);
| ~^ ~~~~~~~~~~~
| | |
| int unsigned int
| %d
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
This commit is contained in:
committed by
Bjorn Andersson
parent
7bb7cc2a10
commit
33092e27b0
@@ -144,7 +144,7 @@ static void ftdi_gpio_parse_config(struct ftdi_gpio *ftdi_gpio, char *control_de
|
||||
|
||||
gpio_offset = strtoul(off, NULL, 0);
|
||||
if (gpio_offset > 7)
|
||||
errx(1, "GPIOs offset invalid: '%d'", gpio_offset);
|
||||
errx(1, "GPIOs offset invalid: '%u'", gpio_offset);
|
||||
|
||||
if (strncmp("ACTIVE_HIGH", pol, c - pol - 1) == 0)
|
||||
gpio_polarity = GPIO_ACTIVE_HIGH;
|
||||
|
||||
Reference in New Issue
Block a user