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