From 88c5b732d2966ee45cb9066df53821e075ffeafb Mon Sep 17 00:00:00 2001 From: Jens True Date: Wed, 10 Nov 2021 11:02:35 +0000 Subject: [PATCH] Suppress unusedFunction warnings from cppcheck --- src/main.cpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 1e72f8a..43f2e46 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -33,6 +33,7 @@ CommandHandler cmd_handler(&display); * * Write some debug information to the serial port and initialize the display. */ +// cppcheck-suppress unusedFunction void setup() { 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. */ +// cppcheck-suppress unusedFunction void loop() { while (Serial.available() > 0) @@ -69,20 +71,4 @@ void loop() String input = Serial.readStringUntil('\n'); 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(); - } } \ No newline at end of file