-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Compiler warning for cast in Ticker code #6281
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
Comments
You have a problem in your code. The function signature for a callback is
|
Are you saying the callback function can't take other types as argument, as explained in the sample? https://github.com./esp8266/Arduino/blob/master/libraries/Ticker/examples/TickerParameter/TickerParameter.ino |
Actually, I'm mistaken and you're right. The template is supposed to handle that from how I read it:
The (void*) in the template body looks to be incorrect and should be able to do promotion to a pointer silently, w/o error. We need a fix and a test case that hits this. |
Fixes errors seen in esp8266#6281 and adds a slight test case to the examples to ensure no compiler errors.
Fixes errors seen in #6281 and adds a slight test case to the examples to ensure no compiler errors.
Thanks! I can confirm it's fixed in 8c37601 - closing this issue |
Sample code:
I get this warning when compiling the latest git version:
It originates from this line of code (changed in commit 7910121):
Arduino/libraries/Ticker/Ticker.h
Line 110 in 48ace77
It seems that it's caused by the
(void*)
cast in the last parameter.The text was updated successfully, but these errors were encountered: