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:
Krzysztof Kozlowski
2023-05-07 11:32:35 +02:00
committed by Bjorn Andersson
parent 7bb7cc2a10
commit 33092e27b0

View File

@@ -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;