Index: cppcheck.err =================================================================== diff -u -r99e5b87f73c3b849ba33a212ec84cf4bf6ef38f1 -r1da89b0452b8ef9448847618e75c118f3f58bd0c --- cppcheck.err (.../cppcheck.err) (revision 99e5b87f73c3b849ba33a212ec84cf4bf6ef38f1) +++ cppcheck.err (.../cppcheck.err) (revision 1da89b0452b8ef9448847618e75c118f3f58bd0c) @@ -1,4 +1,4 @@ -06/06/2023 19:31 +06/15/2023 6:44 Behrouz NematiPour 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 ; @@ -48,7 +48,7 @@ sources/storage/FileHandler.h:87:33: style: Variable 'err' is assigned a value that is never used. [unreadVariable] FileCopyError_Enums err = eOK; ^ -sources/MainTimer.cpp:69: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: +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) { int i = 0; @@ -63,7 +63,7 @@ When you see this message it is always safe to reduce the variable scope 1 level. [variableScope] static int oH,oM,oS; int cH,cM,cS; ^ -sources/MainTimer.cpp:69:19: style: The scope of the variable 'oM' 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: +sources/MainTimer.cpp:78:19: style: The scope of the variable 'oM' 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) { int i = 0; @@ -78,7 +78,7 @@ When you see this message it is always safe to reduce the variable scope 1 level. [variableScope] static int oH,oM,oS; int cH,cM,cS; ^ -sources/MainTimer.cpp:69:22: style: The scope of the variable 'oS' 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: +sources/MainTimer.cpp:78:22: style: The scope of the variable 'oS' 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) { int i = 0; @@ -435,6 +435,9 @@ When you see this message it is always safe to reduce the variable scope 1 level. [variableScope] static bool notified = false; ^ +sources/storage/Settings.cpp:34:13: style: Variable 'err' is assigned a value that is never used. [unreadVariable] + int err = Settings::Settings_Error::eError_None; + ^ sources/storage/TreatmentLog.cpp:487:10: style: Condition '!ok' is always false [knownConditionTrueFalse] if ( ! ok ) { ^ @@ -459,7 +462,7 @@ sources/view/settings/VNetworkModel.cpp:282:9: style: Consider using std::find_if algorithm instead of a raw loop. [useStlAlgorithm] { ^ -sources/view/settings/VSettings.cpp:187:17: style: Consider using std::accumulate algorithm instead of a raw loop. [useStlAlgorithm] +sources/view/settings/VSettings.cpp:199:17: style: Consider using std::accumulate algorithm instead of a raw loop. [useStlAlgorithm] keyList += keys.join(""); ^ unittests/tst_messaging.cpp:294:18: style: Variable 'msg.actionId' is reassigned a value before the old one has been used. [redundantAssignment] @@ -510,7 +513,7 @@ unittests/tst_views.cpp:35:0: style: The function 'VTreatmentAdjustmentsResponse_text_WAReason' is never used. [unusedFunction] ^ -sources/view/settings/VSettings.cpp:304:0: style: The function 'checkServicePasswordSet' is never used. [unusedFunction] +sources/view/settings/VSettings.cpp:316:0: style: The function 'checkServicePasswordSet' is never used. [unusedFunction] ^ unittests/tst_canbus.cpp:312:0: style: The function 'cleanup' is never used. [unusedFunction] @@ -684,10 +687,10 @@ sources/view/hd/alarm/VAlarmStatus.cpp:201:0: style: The function 'instructionValues' is never used. [unusedFunction] ^ -sources/view/settings/VSettings.cpp:244:0: style: The function 'isPasswordValid' is never used. [unusedFunction] +sources/view/settings/VSettings.cpp:256:0: style: The function 'isPasswordValid' is never used. [unusedFunction] ^ -sources/view/settings/VSettings.cpp:286:0: style: The function 'isServicePasswordMatch' is never used. [unusedFunction] +sources/view/settings/VSettings.cpp:298:0: style: The function 'isServicePasswordMatch' is never used. [unusedFunction] ^ unittests/tst_logging.cpp:66:0: style: The function 'logDatum' is never used. [unusedFunction] @@ -720,15 +723,15 @@ sources/storage/FileHandler.cpp:167:0: style: The function 'moveFolder' is never used. [unusedFunction] ^ +sources/ApplicationController.cpp:516:0: style: The function 'postDoneRequest' is never used. [unusedFunction] + +^ unittests/tst_logging.cpp:149:0: style: The function 'readUnknown' is never used. [unusedFunction] ^ sources/storage/FileHandler.cpp:208:0: style: The function 'removeFiles' is never used. [unusedFunction] ^ -sources/storage/FileHandler.cpp:188:0: style: The function 'removeFolder' is never used. [unusedFunction] - -^ sources/bluetooth/BluetoothInterface.cpp:1239:0: style: The function 'requestBattery' is never used. [unusedFunction] ^ @@ -747,7 +750,7 @@ unittests/tst_logging.cpp:142:0: style: The function 'setLogPath_T' is never used. [unusedFunction] ^ -sources/MainTimer.cpp:116:0: style: The function 'timerEvent' is never used. [unusedFunction] +sources/MainTimer.cpp:137:0: style: The function 'timerEvent' is never used. [unusedFunction] ^ unittests/tst_acknow.cpp:62:0: style: The function 'tst_AcknowModel_Init' is never used. [unusedFunction] @@ -1308,8 +1311,11 @@ unittests/tst_utilities.cpp:204:0: style: The function 'tst_toStringList_RemoveDuplicate' is never used. [unusedFunction] ^ -sources/view/settings/VSettings.cpp:299:0: style: The function 'updateServicePassword' is never used. [unusedFunction] +sources/view/settings/VSettings.cpp:311:0: style: The function 'updateServicePassword' is never used. [unusedFunction] ^ +sources/ApplicationController.cpp:639:0: style: The function 'versionsRequest' is never used. [unusedFunction] + +^ nofile:0:0: information: Cppcheck cannot find all the include files. Cppcheck can check the code without the include files found. But the results will probably be more accurate if all the include files are found. Please check your project's include directories and add all of them as include directories for Cppcheck. To see what files Cppcheck cannot find use --check-config. [missingInclude]