Index: etc/reports/cppcheck/cppcheck.err =================================================================== diff -u -r2bef7b8a25a76a4597aa833955c57fd1c4884de7 -r9bc48695cdb977a80d3279cacdc101d5164f1b4b --- etc/reports/cppcheck/cppcheck.err (.../cppcheck.err) (revision 2bef7b8a25a76a4597aa833955c57fd1c4884de7) +++ etc/reports/cppcheck/cppcheck.err (.../cppcheck.err) (revision 9bc48695cdb977a80d3279cacdc101d5164f1b4b) @@ -1,4 +1,4 @@ -03/13/2025 19:37 +04/21/2025 17:38 Behrouz NematiPour /home/denali/Public/luis/application/sources/canbus/MessageAcknowModel.h:58:9: performance: When an object of a class is created, the constructors of all member variables are called consecutively in the order the variables are declared, even if you don't explicitly write them to the initialization list. You could avoid assigning '_sequence' a value by passing the value to the constructor in the initialization list. [useInitializationList] _sequence = vSequence ; @@ -30,24 +30,24 @@ /home/denali/Public/luis/application/sources/storage/FileHandler.h:93:33: style: Variable 'err' is assigned a value that is never used. [unreadVariable] FileCopyError_Enums err = eOK; ^ -/home/denali/Public/luis/application/sources/ApplicationPost.cpp:165:9: style: Condition '!ok' is always false [knownConditionTrueFalse] - if (! ok) emit didFail(Gui::GuiAlarmID::ALARM_ID_TD_UI_POST_FAILURE_DISPLAY); - ^ +/home/denali/Public/luis/application/sources/ApplicationPost.cpp:165:10: style: Condition '!ok' is always false [knownConditionTrueFalse] + if ( ! ok ) emit didFail(Gui::GuiAlarmID::ALARM_ID_UI_POST_FAILURE_DISPLAY); + ^ /home/denali/Public/luis/application/sources/ApplicationPost.cpp:163:15: note: Assignment 'ok=true', assigned value is 1 bool ok = true; ^ -/home/denali/Public/luis/application/sources/ApplicationPost.cpp:165:9: note: Condition '!ok' is always false - if (! ok) emit didFail(Gui::GuiAlarmID::ALARM_ID_TD_UI_POST_FAILURE_DISPLAY); - ^ -/home/denali/Public/luis/application/sources/ApplicationPost.cpp:303:9: style: Condition '!ok' is always false [knownConditionTrueFalse] - if (! ok) emit didFail(Gui::GuiAlarmID::ALARM_ID_TD_UI_POST_FAILURE_SOUND); - ^ +/home/denali/Public/luis/application/sources/ApplicationPost.cpp:165:10: note: Condition '!ok' is always false + if ( ! ok ) emit didFail(Gui::GuiAlarmID::ALARM_ID_UI_POST_FAILURE_DISPLAY); + ^ +/home/denali/Public/luis/application/sources/ApplicationPost.cpp:303:10: style: Condition '!ok' is always false [knownConditionTrueFalse] + if ( ! ok ) emit didFail(Gui::GuiAlarmID::ALARM_ID_UI_POST_FAILURE_SOUND); + ^ /home/denali/Public/luis/application/sources/ApplicationPost.cpp:301:15: note: Assignment 'ok=true', assigned value is 1 bool ok = true; ^ -/home/denali/Public/luis/application/sources/ApplicationPost.cpp:303:9: note: Condition '!ok' is always false - if (! ok) emit didFail(Gui::GuiAlarmID::ALARM_ID_TD_UI_POST_FAILURE_SOUND); - ^ +/home/denali/Public/luis/application/sources/ApplicationPost.cpp:303:10: note: Condition '!ok' is always false + if ( ! ok ) emit didFail(Gui::GuiAlarmID::ALARM_ID_UI_POST_FAILURE_SOUND); + ^ /home/denali/Public/luis/application/sources/MainTimer.cpp:78:16: style: The scope of the variable 'oH' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced: void f(int x) {