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

Compiler Warning #4

Open
matthias-bs opened this issue Feb 17, 2023 · 0 comments
Open

Compiler Warning #4

matthias-bs opened this issue Feb 17, 2023 · 0 comments

Comments

@matthias-bs
Copy link

Hi,

I am using this library in a CI (Continuous Integration) workflow. Depending on the compiler settings, some types of warnings are treated as errors. Thus I get the following error:

/home/runner/Arduino/libraries/DistanceSensor_A02YYUW/DistanceSensor_A02YYUW.cpp: In member function 'DistanceSensor_A02YYUW_MEASSUREMENT_STATUS DistanceSensor_A02YYUW::meassure()':
/home/runner/Arduino/libraries/DistanceSensor_A02YYUW/DistanceSensor_A02YYUW.cpp:15:17: error: unused variable 'startTime' [-Werror=unused-variable]
   unsigned long startTime = millis();
                 ^~~~~~~~~
/home/runner/Arduino/libraries/DistanceSensor_A02YYUW/DistanceSensor_A02YYUW.cpp: In member function 'void DistanceSensor_A02YYUW::_flushSerialInput()':
/home/runner/Arduino/libraries/DistanceSensor_A02YYUW/DistanceSensor_A02YYUW.cpp:74:17: error: unused variable 'startTime' [-Werror=unused-variable]
   unsigned long startTime = millis();
                 ^~~~~~~~~
cc1plus: some warnings being treated as errors

Should be easy to fix...

Best regards
Matthias

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

No branches or pull requests

1 participant