Skip to content

Firmware, GPAD_API, Rev ???, Static Analysis of 20260720 #590

Description

@ForrestErickson

Describe the bug
A clear and concise description of what the bug is.
Short Summary of the expected behavior:
Static analysis should report no serious errors.
If there are warnings they should be understood and a written acceptance document left by the firmware developer(s) or team as artifact with the firmware release.

Short Summary of the buggy behavior:
From the analysis
Image

To Reproduce
Steps to reproduce the behavior:

  1. Go to the project in VSCode
  2. Click on ant icon
  3. Expand the esp32dev
  4. Expand the Advanced features
  5. Click on the one marked "Check"

Screen shot of analysis invocation

Image

Expected behavior
A clear and concise description of what you expected to happen.
Ideally no errors and no warnings of any level..

Additional context
Add any other context about the problem here.

Full report from the analysis:

  • Executing task: C:\Users\Admin.platformio\penv\Scripts\platformio.exe check --environment esp32dev

Checking esp32dev > cppcheck (platform: espressif32@^6.12.0; board: esp32dev; framework: arduino)

.pio\libdeps\esp32dev\DFRobotDFPlayerMini\DFRobotDFPlayerMini.h:69: [medium:warning] Member variable 'DFRobotDFPlayerMini::_serial' is not initialized. [uninitMemberVarPrivate]
.pio\libdeps\esp32dev\DFRobotDFPlayerMini\DFRobotDFPlayerMini.h:71: [medium:warning] Member variable 'DFRobotDFPlayerMini::timeOutTimer' is not initialized. [uninitMemberVarPrivate]
GPAD_API\DFPlayer.cpp:25: [low:style] The function 'serialSplashDFP' is never used. [unusedFunction]
GPAD_API\DFPlayer.cpp:49: [low:style] The function 'checkSerial' is never used. [unusedFunction]
GPAD_API\DFPlayer.cpp:136: [low:style] The function 'setupDFPlayer' is never used. [unusedFunction]
GPAD_API\DFPlayer.cpp:201: [low:style] The function 'displayDFPlayerStats' is never used. [unusedFunction]
GPAD_API\DFPlayer.cpp:301: [low:style] The function 'dfPlayerUpdate' is never used. [unusedFunction]
GPAD_API\DFPlayer.cpp:311: [low:style] The function 'playNotBusy' is never used. [unusedFunction]
GPAD_API\DFPlayer.cpp:331: [low:style] The function 'playNotBusyLevel' is never used. [unusedFunction]
GPAD_API\DFPlayer.cpp:369: [low:style] The function 'playAlarmLevel' is never used. [unusedFunction]
.pio\libdeps\esp32dev\ESPAsyncWebServer\src\ESPAsyncWebServer.h:9: [high:error] failed to evaluate #if condition, division/modulo by zero [preprocessorErrorDirective]
GPAD_API\GPAD_HAL.cpp:451: [low:style] Array index 'written' is used before limits check. [arrayIndexThenCheck]
GPAD_API\GPAD_HAL.h:149: [low:style] Class 'GPAD_API' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
.pio\libdeps\esp32dev\WiFiManager\WiFiManager.h:205: [low:style] Class 'WiFiManagerParameter' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
.pio\libdeps\esp32dev\WiFiManager\WiFiManager.h:250: [low:style] Class 'WiFiManager' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
GPAD_API\GPAD_HAL.cpp:1184: [low:style] Parameter 'deviceIp' can be declared as reference to const [constParameterReference]
GPAD_API\GPAD_HAL.cpp:1482: [low:style] Parameter 'buf' can be declared as pointer to const [constParameterPointer]
GPAD_API\GPAD_HAL.cpp:2340: [low:style] Parameter 'msg' can be declared as pointer to const [constParameterPointer]
GPAD_API\GPAD_HAL.cpp:2533: [low:style] Parameter 'serialport' can be declared as pointer to const [constParameterPointer]
GPAD_API\GPAD_HAL.cpp:2543: [low:style] Parameter 'serialport' can be declared as pointer to const [constParameterPointer]
GPAD_API\GPAD_HAL.cpp:2554: [low:style] Parameter 'serialport' can be declared as pointer to const [constParameterPointer]
GPAD_API\GPAD_HAL.cpp:99: [low:style] The function 'getComPortConfig' is never used. [unusedFunction]
GPAD_API\GPAD_HAL.cpp:101: [low:style] The function 'setComPortBaudRate' is never used. [unusedFunction]
GPAD_API\GPAD_HAL.cpp:109: [low:style] The function 'setComPortSerialFormatIndex' is never used. [unusedFunction]
GPAD_API\GPAD_HAL.cpp:117: [low:style] The function 'setComPortFlowControl' is never used. [unusedFunction]
GPAD_API\GPAD_HAL.cpp:800: [low:style] The function 'mqttStatusText' is never used. [unusedFunction]
GPAD_API\GPAD_HAL.cpp:813: [low:style] The function 'filterCopy' is never used. [unusedFunction]
GPAD_API\GPAD_HAL.cpp:1059: [low:style] The function 'setup_spi' is never used. [unusedFunction]
GPAD_API\GPAD_HAL.cpp:1100: [low:style] The function 'receive_byte' is never used. [unusedFunction]
GPAD_API\GPAD_HAL.cpp:1115: [low:style] The function 'updateFromSPI' is never used. [unusedFunction]
GPAD_API\GPAD_HAL.cpp:1184: [low:style] The function 'GPAD_HAL_setup' is never used. [unusedFunction]
GPAD_API\GPAD_HAL.cpp:1482: [low:style] The function 'interpretBuffer' is never used. [unusedFunction]
GPAD_API\GPAD_HAL.cpp:1720: [low:style] The function 'GPAD_HAL_loop' is never used. [unusedFunction]
GPAD_API\GPAD_HAL.cpp:1748: [low:style] The function 'isAlarmActionSelectorActive' is never used. [unusedFunction]
GPAD_API\GPAD_HAL.cpp:1753: [low:style] The function 'lcdUiStateName' is never used. [unusedFunction]
GPAD_API\GPAD_HAL.cpp:1774: [low:style] The function 'drawLcdStatusIconsNow' is never used. [unusedFunction]
GPAD_API\GPAD_HAL.cpp:1787: [low:style] The function 'noteLcdQueueMessageReceived' is never used. [unusedFunction]
GPAD_API\GPAD_HAL.cpp:1843: [low:style] The function 'showInfoPage' is never used. [unusedFunction]
GPAD_API\GPAD_HAL.cpp:1853: [low:style] The function 'showWifiStatusPage' is never used. [unusedFunction]
GPAD_API\GPAD_HAL.cpp:1889: [low:style] The function 'alarmActionSelectorHandleRotation' is never used. [unusedFunction]
GPAD_API\GPAD_HAL.cpp:2198: [low:style] The function 'filter_control_chars' is never used. [unusedFunction]
GPAD_API\GPAD_HAL.cpp:2533: [low:style] The function 'restoreAlarmLevel' is never used. [unusedFunction]
GPAD_API\GPAD_HAL.cpp:2554: [low:style] The function 'showMainLcdFrameNow' is never used. [unusedFunction]
GPAD_API\GPAD_HAL.cpp:2572: [low:style] The function 'annunciateAlarmLevel' is never used. [unusedFunction]
GPAD_API\GPAD_HAL.cpp:2592: [low:style] The function 'getVersion' is never used. [unusedFunction]
GPAD_API\GPAD_menu.cpp:377: [high:error] There is an unknown macro here somewhere. Configuration is required. If DECL_FIELD
is a macro then please configure it. [unknownMacro]
GPAD_API\GPAD_HAL.h:149: [low:style] Class 'GPAD_API' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
.pio\libdeps\esp32dev\LiquidCrystal_I2C\LiquidCrystal_I2C.h:85: [low:style] The function 'write' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride]
GPAD_API\InterruptRotator.cpp:16: [low:style] The function 'initRotator' is never used. [unusedFunction]
GPAD_API\InterruptRotator.cpp:33: [low:style] The function 'updateRotator' is never used. [unusedFunction]
.pio\libdeps\esp32dev\WiFiManager\WiFiManager.h:205: [low:style] Class 'WiFiManagerParameter' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
.pio\libdeps\esp32dev\WiFiManager\WiFiManager.h:250: [low:style] Class 'WiFiManager' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
GPAD_API\WiFiManagerOTA.cpp:173: [low:style] Local variable 'index' shadows outer function [shadowFunction]
GPAD_API\WiFiManagerOTA.cpp:215: [low:style] Local variable 'apStartedCallback' shadows outer variable [shadowVariable]
GPAD_API\WiFiManagerOTA.cpp:222: [low:performance] Function parameter 'info' should be passed by const reference. [passedByValue]
GPAD_API\WiFiManagerOTA.cpp:142: [low:style] The function 'initialize' is never used. [unusedFunction]
GPAD_API\WiFiManagerOTA.cpp:153: [low:style] The function 'connect' is never used. [unusedFunction]
GPAD_API\WiFiManagerOTA.cpp:264: [low:style] The function 'startConfigPortal' is never used. [unusedFunction]
GPAD_API\WiFiManagerOTA.cpp:270: [low:style] The function 'forgetSavedCredentials' is never used. [unusedFunction]
GPAD_API\WiFiManagerOTA.cpp:282: [low:style] The function 'getAddress' is never used. [unusedFunction]
GPAD_API\WiFiManagerOTA.cpp:363: [low:style] The function 'hasSavedCredentials' is never used. [unusedFunction]
GPAD_API\WiFiManagerOTA.cpp:369: [low:style] The function 'loadCredentials' is never used. [unusedFunction]
GPAD_API\WiFiManagerOTA.cpp:561: [low:style] The function 'initLittleFS' is never used. [unusedFunction]
GPAD_API\WiFiManagerOTA.cpp:575: [low:style] The function 'isLittleFSMounted' is never used. [unusedFunction]
GPAD_API\WiFiManagerOTA.cpp:621: [low:style] The function 'processor' is never used. [unusedFunction]
GPAD_API\Wink.cpp:20: [low:style] The function 'queueWinkPattern' is never used. [unusedFunction]
GPAD_API\Wink.cpp:28: [low:style] The function 'wink' is never used. [unusedFunction]
GPAD_API\alarm_api.cpp:49: [low:style] Parameter 'str' can be declared as pointer to const [constParameterPointer]
GPAD_API\alarm_api.cpp:45: [low:style] The function 'alarm_event' is never used. [unusedFunction]
GPAD_API\alarm_api.cpp:77: [low:style] The function 'isMuted' is never used. [unusedFunction]
GPAD_API\alarm_api.cpp:82: [low:style] The function 'toggleMuted' is never used. [unusedFunction]
GPAD_API\alarm_api.cpp:93: [low:style] The function 'setMuteTimeoutMinutes' is never used. [unusedFunction]
GPAD_API\alarm_api.cpp:117: [low:style] The function 'serviceMuteTimeout' is never used. [unusedFunction]
GPAD_API\alarm_api.cpp:133: [low:style] The function 'getCurrentAlarmLevel' is never used. [unusedFunction]
GPAD_API\alarm_api.cpp:138: [low:style] The function 'getCurrentMessage' is never used. [unusedFunction]
GPAD_API\GPAD_HAL.h:149: [low:style] Class 'GPAD_API' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
GPAD_API\gpad_serial.cpp:47: [low:style] The function 'processSerial' is never used. [unusedFunction]
GPAD_API\gpad_utility.cpp:28: [low:style] The function 'printError' is never used. [unusedFunction]
GPAD_API\gpad_utility.cpp:37: [low:style] The function 'printAlarmState' is never used. [unusedFunction]
.pio\libdeps\esp32dev\PubSubClient\src\PubSubClient.h:117: [low:style] Class 'PubSubClient' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
.pio\libdeps\esp32dev\PubSubClient\src\PubSubClient.h:170: [low:style] The function 'write' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride]
.pio\libdeps\esp32dev\PubSubClient\src\PubSubClient.h:173: [low:style] The function 'write' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride]
GPAD_API\mqtt_handler.cpp:91: [low:style] Parameter 'client' can be declared as pointer to const [constParameterPointer]
GPAD_API\mqtt_handler.cpp:57: [low:style] The function 'serviceMqttQueue' is never used. [unusedFunction]
GPAD_API\mqtt_handler.cpp:79: [low:style] The function 'publishAck' is never used. [unusedFunction]
GPAD_API\mqtt_handler.cpp:91: [low:style] The function 'publishGPAPResponse' is never used. [unusedFunction]
GPAD_API\operator_settings.cpp:38: [low:style] The function 'loadVolumeSetting' is never used. [unusedFunction]
GPAD_API\operator_settings.cpp:48: [low:style] The function 'loadMuteTimeoutMinutesSetting' is never used. [unusedFunction]
GPAD_API\operator_settings.cpp:58: [low:style] The function 'loadAlarmRepeatSecondsSetting' is never used. [unusedFunction]
GPAD_API\operator_settings.cpp:68: [low:style] The function 'saveVolumeSetting' is never used. [unusedFunction]
GPAD_API\operator_settings.cpp:73: [low:style] The function 'saveMuteTimeoutMinutesSetting' is never used. [unusedFunction]
GPAD_API\operator_settings.cpp:78: [low:style] The function 'saveAlarmRepeatSecondsSetting' is never used. [unusedFunction]
GPAD_API\setup_status.cpp:24: [low:style] The function 'setSetupError' is never used. [unusedFunction]
GPAD_API\setup_status.cpp:34: [low:style] The function 'formatSetupErrors' is never used. [unusedFunction]
GPAD_API\spi_broker_mirror.cpp:38: [low:style] The function 'initializeSpiBrokerMirror' is never used. [unusedFunction]
GPAD_API\spi_broker_mirror.cpp:50: [low:style] The function 'queueSpiBrokerMirror' is never used. [unusedFunction]
GPAD_API\spi_broker_mirror.cpp:73: [low:style] The function 'serviceSpiBrokerMirror' is never used. [unusedFunction]
================================================================================================= [PASSED] Took 422.12 seconds =================================================================================================
Component HIGH MEDIUM LOW


.pio\libdeps\esp32dev\DFRobotDFPlayerMini 0 2 0
.pio\libdeps\esp32dev\ESPAsyncWebServer\src 1 0 0
.pio\libdeps\esp32dev\LiquidCrystal_I2C 0 0 1
.pio\libdeps\esp32dev\PubSubClient\src 0 0 3
.pio\libdeps\esp32dev\WiFiManager 0 0 4
GPAD_API 1 0 85

Total 2 2 93

Environment Tool Status Duration


esp32dev cppcheck PASSED 00:07:02.121
================================================================================================= 1 succeeded in 00:07:02.121 =================================================================================================

  • Terminal will be reused by tasks, press any key to close it.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions