src/pPowerManger/main.cpp:0:0: information: Too many #ifdef configurations - cppcheck only checks 12 of 78 configurations. Use --force to check all configurations. [toomanyconfigs] ^ src/pPowerManger/systemData.h:524:22: error: Array 'reserved2[1]' accessed at index 1, which is out of bounds. [arrayIndexOutOfBounds] reserved2[i] = data.reserved2[i]; ^ src/pPowerManger/systemData.h:523:23: note: Assuming that condition 'i<2' is not redundant for(int i=0; i<2; i++) { ^ src/pPowerManger/systemData.h:524:22: note: Array index out of bounds reserved2[i] = data.reserved2[i]; ^ src/pPowerManger/systemData.h:524:42: error: Array 'data.reserved2[1]' accessed at index 1, which is out of bounds. [arrayIndexOutOfBounds] reserved2[i] = data.reserved2[i]; ^ src/pPowerManger/systemData.h:523:23: note: Assuming that condition 'i<2' is not redundant for(int i=0; i<2; i++) { ^ src/pPowerManger/systemData.h:524:42: note: Array index out of bounds reserved2[i] = data.reserved2[i]; ^ src/pPowerManger/upmsg/uPower_pmState.h:14:9: error: Using 'memset' on struct that contains a 'std::vector'. [memsetClass] memset(&state, 0, sizeof(state)); ^ src/pPowerManger/logc/loguru.hpp:666:3: warning: Member variable 'LogScopeRAII::_verbosity' is not initialized in the constructor. [uninitMemberVar] LogScopeRAII() : _file(nullptr) {} // No logging ^ src/pPowerManger/logc/loguru.hpp:666:3: warning: Member variable 'LogScopeRAII::_line' is not initialized in the constructor. [uninitMemberVar] LogScopeRAII() : _file(nullptr) {} // No logging ^ src/pPowerManger/logc/loguru.hpp:666:3: warning: Member variable 'LogScopeRAII::_indent_stderr' is not initialized in the constructor. [uninitMemberVar] LogScopeRAII() : _file(nullptr) {} // No logging ^ src/pPowerManger/logc/loguru.hpp:666:3: warning: Member variable 'LogScopeRAII::_start_time_ns' is not initialized in the constructor. [uninitMemberVar] LogScopeRAII() : _file(nullptr) {} // No logging ^ src/pPowerManger/logc/loguru.hpp:666:3: warning: Member variable 'LogScopeRAII::_name' is not initialized in the constructor. [uninitMemberVar] LogScopeRAII() : _file(nullptr) {} // No logging ^ src/pPowerManger/sqlit3/SQLite.h:13:5: style: Class 'SQLite' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] SQLite(const std::string& dbName); ^ src/pPowerManger/UpperCommManager.h:52:5: style: Class 'UpperCommManager' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] UpperCommManager(PowerManger* powerManager); ^ src/pPowerManger/httpserver/httpserver.h:20:5: style: Class 'HttpServer' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] HttpServer(int port = 8000); ^ src/pPowerManger/fsm/PowerManagerFsm.hpp:275:10: style: The function 'react' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride] void react(FaultEvent const &); ^ src/pPowerManger/fsm/PowerManagerFsm.hpp:90:18: note: Virtual function in base class virtual void react(FaultEvent const &e); ^ src/pPowerManger/fsm/PowerManagerFsm.hpp:275:10: note: Function in derived class void react(FaultEvent const &); ^ src/pPowerManger/udpcomm/udpComm.h:54:31: style: C-style pointer casting [cstyleCast] udpScoket->iSendMessageTo((void*) msg, size, ccuPort, ccuHost); ^ src/pPowerManger/upmsg/uPower_disSysState.h:34:42: style: C-style pointer casting [cstyleCast] dis["HVolBusBreaker_uint16"] = *(unsigned short*)pdis1; ^ src/pPowerManger/upmsg/uPower_disSysState.h:35:42: style: C-style pointer casting [cstyleCast] dis["HVolABusBreaker_unit16"] = *(unsigned short*)pdis2; ^ src/pPowerManger/upmsg/uPower_disSysState.h:36:42: style: C-style pointer casting [cstyleCast] dis["HVolBBusBreaker_unit16"] = *(unsigned short*)pdis3; ^ src/pPowerManger/upmsg/uPower_disSysState.h:37:42: style: C-style pointer casting [cstyleCast] dis["LVolBusBreaker_uint16"] = *(unsigned short*)pdis4; ^ src/pPowerManger/upmsg/uExternComm_setDeviceSwitch.h:29:20: style: Variable 'cmd.id' is reassigned a value before the old one has been used. [redundantAssignment] cmd.id = root["id_uint8"].asUInt(); ^ src/pPowerManger/upmsg/uExternComm_setDeviceSwitch.h:24:20: note: cmd.id is assigned cmd.id = -1; ^ src/pPowerManger/upmsg/uExternComm_setDeviceSwitch.h:29:20: note: cmd.id is overwritten cmd.id = root["id_uint8"].asUInt(); ^ src/pPowerManger/upmsg/uExternComm_setOpCondition.h:34:13: style: Statements following 'return' will never be executed. [unreachableCode] LOG_F(INFO, "上位机指令:opCondition: %d", root["state_uint8"].asUInt()); ^ src/pPowerManger/udpcomm/udpComm.h:45:38: performance: Function parameter 'cmd' should be passed by const reference. [passedByValue] bool sendCcuColCmd(const ccuColCmd cmd); ^ src/pPowerManger/fsm/PowerManagerFsm.hpp:49:27: performance: Function parameter 'eventName' should be passed by const reference. [passedByValue] TestEvent(std::string eventName, unsigned int type,unsigned int eventId) : eventName(eventName), eventId(eventId),type(type) {}; ^ src/pPowerManger/LowerCommManager.h:85:41: performance: Function parameter 'cmd' should be passed by const reference. [passedByValue] bool sendCcuCommand(const ccuColCmd cmd); ^ src/pPowerManger/upmsg/uDevice_secdistState.h:195:61: style: Parameter 'state' can be declared as reference to const [constParameter] std::string buildSecdistStateToJson(DeviceSecdistState &state){ ^ src/pPowerManger/upmsg/uDevice_secdistState.h:435:39: style: Parameter 'driver' can be declared as reference to const [constParameter] std::string buildMsg(DriverTable &driver){ ^ src/pPowerManger/upmsg/uPlan_taskStart.h:29:20: error: Uninitialized variable: mission [uninitvar] return mission; ^ src/pPowerManger/upmsg/uExternComm_setDeviceSwitch.h:39:16: warning: Uninitialized variable: cmd.cmd [uninitvar] return cmd; ^ src/pPowerManger/upmsg/uExternComm_setDeviceSwitch.h:34:40: note: Assuming condition is false if (root.isMember("cmd_uint8") && root["cmd_uint8"].isUInt()) { ^ src/pPowerManger/upmsg/uExternComm_setDeviceSwitch.h:39:16: note: Uninitialized variable: cmd.cmd return cmd; ^ nofile:0:0: information: Cppcheck cannot find all the include files (use --check-config for details) [missingInclude]