Index: cppcheck.err =================================================================== diff -u -rcf61c7736f11f4b75a4e2df803f29bdc7769db53 -rd826e189e0dff4b91f880c73236129fa3c25a978 --- cppcheck.err (.../cppcheck.err) (revision cf61c7736f11f4b75a4e2df803f29bdc7769db53) +++ cppcheck.err (.../cppcheck.err) (revision d826e189e0dff4b91f880c73236129fa3c25a978) @@ -1,5 +1,5 @@ -05/31/2023 2:53 -Behrouz NematiPour +07/06/2023 11:16 +msuleiman 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 ; ^ @@ -9,13 +9,13 @@ sources/device/DeviceModels.h:50:21: style: Consider using std::accumulate algorithm instead of a raw loop. [useStlAlgorithm] mString += QString(",%1").arg(param.toString()); ^ -sources/storage/FileHandler.h:102:14: style: Condition '!createFolder' is always false [knownConditionTrueFalse] +sources/storage/FileHandler.h:105:14: style: Condition '!createFolder' is always false [knownConditionTrueFalse] if ( ! createFolder ) { if ( ! dstDir.exists() ) { err = eDstFolderNotExist ; goto lErr; }} ^ -sources/storage/FileHandler.h:95:35: note: Assignment 'createFolder=true', assigned value is 1 +sources/storage/FileHandler.h:97:35: note: Assignment 'createFolder=true', assigned value is 1 bool createFolder = true; ^ -sources/storage/FileHandler.h:102:14: note: Condition '!createFolder' is always false +sources/storage/FileHandler.h:105:14: note: Condition '!createFolder' is always false if ( ! createFolder ) { if ( ! dstDir.exists() ) { err = eDstFolderNotExist ; goto lErr; }} ^ sources/ApplicationPost.cpp:113:9: style: Condition '!ok' is always false [knownConditionTrueFalse] @@ -45,16 +45,16 @@ sources/ApplicationPost.cpp:222:9: note: Condition '!ok' is always false if (! ok) emit didFail(Gui::GuiAlarmID::ALARM_ID_HD_UI_POST_FAILURE_SOUND); ^ -sources/storage/FileHandler.h:92:17: style: Local variable 'totalSize' shadows outer function [shadowFunction] +sources/storage/FileHandler.h:94:17: style: Local variable 'totalSize' shadows outer function [shadowFunction] qint64 totalSize = 0; ^ sources/storage/FileHandler.h:75:21: note: Shadowed declaration static quint64 totalSize(const QFileInfoList &vFileInfoList); ^ -sources/storage/FileHandler.h:92:17: note: Shadow variable +sources/storage/FileHandler.h:94:17: note: Shadow variable qint64 totalSize = 0; ^ -sources/storage/FileHandler.h:87:33: style: Variable 'err' is assigned a value that is never used. [unreadVariable] +sources/storage/FileHandler.h:89: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: @@ -576,13 +576,13 @@ sources/view/hd/adjustment/disinfect/VDisinfectAdjustDisinfect.cpp:147:0: style: The function 'doDisinfectROPermeate' is never used. [unusedFunction] ^ -sources/gui/GuiView.cpp:250:0: style: The function 'doExportListInsert' is never used. [unusedFunction] +sources/gui/GuiView.cpp:251:0: style: The function 'doExportListInsert' is never used. [unusedFunction] ^ -sources/gui/GuiView.cpp:293:0: style: The function 'doExportListPercent' is never used. [unusedFunction] +sources/gui/GuiView.cpp:294:0: style: The function 'doExportListPercent' is never used. [unusedFunction] ^ -sources/gui/GuiView.cpp:281:0: style: The function 'doExportListSelect' is never used. [unusedFunction] +sources/gui/GuiView.cpp:282:0: style: The function 'doExportListSelect' is never used. [unusedFunction] ^ sources/view/VTreatmentCreate(legacy).cpp:504:0: style: The function 'doGetPrescriptionParameterValues' is never used. [unusedFunction]