Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix empty return value in orangepi_set_gpio_mode in wiringPi.c #115

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Commits on Jul 26, 2024

  1. Fix empty return value in orangepi_set_gpio_mode in wiringPi.c

    Call 'return' without an actual value in a function with return value,
    while allowed in older GCC, is not allowed and strictly forbidden when
    using newer GCC
    
    Replacing it to 'exit(1)' to stick to the similar behaviour in the
    same function
    
    This fixes the following error when compiling wiringPi with GCC 14:
    
    ```
    wiringPi.c:7212:49: error: ‘return’ with no value, in function returning non-void [-Wreturn-mismatch]
     7212 |                                                 return;
          |                                                 ^~~~~~
    wiringPi.c:6362:5: note: declared here
     6362 | int orangepi_set_gpio_mode(int pin, int mode)
          |     ^~~~~~~~~~~~~~~~~~~~~~
    [Compile] mcp23017.c
    make: *** [Makefile:85: wiringPi.o] Error 1
    ```
    7Ji committed Jul 26, 2024
    Configuration menu
    Copy the full SHA
    c29a1b7 View commit details
    Browse the repository at this point in the history