-
Notifications
You must be signed in to change notification settings - Fork 34
ESP32 flags unused function as error (should be warning) #345
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
Solved the specific library in another way, so my acute problem is solved, |
Did you resolve this via the |
The compilation of examples is delegated to the |
Completely different, I moved the static function that caused the error into the class as a normal function. I had the static function as a wrapper around analogRead() which has a different signature on different platforms. Now I have a private function in the class that looks if an external ADC is set, if not it uses internal. |
I reported this issue upstream as I'm facing with the same issue and I can't do the suggested workaround. |
This issue is caught up in a much more complicated discussion, and currently I'm not optimistic about the outcome arduino/ArduinoCore-API#25 |
@ianfixes your expectations are correct. The decision to consider warnings as errors comes from the ESP32 boards platform developers. Why they decided to go with such a strict requirement is not clear to me. We are not building firmware for space travels :) Anyway, the only solution known to me is to comply which means to fix the library. In my case, the library is unmaintained, last commit was 5-years ago. |
I suggest to close this issue. |
Agree on closing the issue
You never know for sure! |
The ACS712 library has a function static uint16_t _internalAnalog(uint8_t pin) that is not used by the examples.
The build sees this function is not used and generates an error on this, imho this should be a warning,
All other platforms tested do not report it as error.
Flag: -Werror=unused-function
build
https://github.com/RobTillaart/ACS712/actions/runs/3924992021/jobs/6747518244
The text was updated successfully, but these errors were encountered: