Index: etc/reports/cppcheck/cppcheck.err =================================================================== diff -u -r6fd40bd4e54a0dc35ae7335a97122626d9c60ee0 -r6ac0e78ba8a65d86f67ce866ed879430fe2b2703 --- etc/reports/cppcheck/cppcheck.err (.../cppcheck.err) (revision 6fd40bd4e54a0dc35ae7335a97122626d9c60ee0) +++ etc/reports/cppcheck/cppcheck.err (.../cppcheck.err) (revision 6ac0e78ba8a65d86f67ce866ed879430fe2b2703) @@ -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) {