1
0

Suppress unusedFunction warnings from cppcheck
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Jens True 2021-11-10 11:02:35 +00:00
parent 7bbae3a624
commit 88c5b732d2

@ -33,6 +33,7 @@ CommandHandler cmd_handler(&display);
* *
* Write some debug information to the serial port and initialize the display. * Write some debug information to the serial port and initialize the display.
*/ */
// cppcheck-suppress unusedFunction
void setup() void setup()
{ {
Serial.begin(BAUDRATE); Serial.begin(BAUDRATE);
@ -62,6 +63,7 @@ void setup()
* *
* Continously read the serial port if input is available. On line change send to the command handler. * Continously read the serial port if input is available. On line change send to the command handler.
*/ */
// cppcheck-suppress unusedFunction
void loop() void loop()
{ {
while (Serial.available() > 0) while (Serial.available() > 0)
@ -69,20 +71,4 @@ void loop()
String input = Serial.readStringUntil('\n'); String input = Serial.readStringUntil('\n');
cmd_handler.parseJSON(input.c_str()); cmd_handler.parseJSON(input.c_str());
} }
}
/**
* @brief Wrapper around arduino setup/loop functions
*
* This mitigates static code analysis warnings.
*
* @return int
*/
int main()
{
setup();
while(1)
{
loop();
}
} }