Skip to content

Conversation

jwlodek
Copy link
Contributor

@jwlodek jwlodek commented Sep 2, 2024

The signature of wiringPiSetupGpioDevice changed in f3415b5, but this example's code was not changed to reflect this which causes it to fail to compile on the master branch. Looking through the source code of that commit, I believe this change should restore the pre-change behavior for this example.

jwlodek@raspberrypi:/epics/utils/WiringPi/examples $ make speed
[CC] speed.c
speed.c: In function ‘main’:
speed.c:96:3: error: too few arguments to function ‘wiringPiSetupGpioDevice’
   wiringPiSetupGpioDevice () ;
   ^~~~~~~~~~~~~~~~~~~~~~~
In file included from speed.c:26:
/usr/local/include/wiringPi.h:228:13: note: declared here
 extern int  wiringPiSetupGpioDevice(enum WPIPinType pinType); //Interface V3.3
             ^~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:158: speed.o] Error 1

I suggest creating a CI workflow for testing example compilation in addition to the project build test.

@mstroh76 mstroh76 changed the base branch from master to gpiochip September 8, 2024 16:58
@mstroh76 mstroh76 self-requested a review September 8, 2024 16:58
@mstroh76 mstroh76 merged commit f0c8991 into WiringPi:gpiochip Sep 8, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants