Index: cppcheck.err =================================================================== diff -u -rb238ed3e1aa94f5c03d4e1a6ed6c9fdfdd2a3cb5 -r93223f7d403a66dcb0d72a31802181c1b38e7ce3 --- cppcheck.err (.../cppcheck.err) (revision b238ed3e1aa94f5c03d4e1a6ed6c9fdfdd2a3cb5) +++ cppcheck.err (.../cppcheck.err) (revision 93223f7d403a66dcb0d72a31802181c1b38e7ce3) @@ -1,3 +1,6 @@ +11/03/2022 14:42 +Behrouz NematiPour +[sources/storage/FileHandler.h:95] -> [sources/storage/FileHandler.h:102]: (style) Condition '!createFolder' is always false [sources/ApplicationPost.cpp:109] -> [sources/ApplicationPost.cpp:111]: (style) Condition '!ok' is always false [sources/ApplicationPost.cpp:204] -> [sources/ApplicationPost.cpp:206]: (style) Condition '!ok' is always false [sources/ApplicationPost.cpp:218] -> [sources/ApplicationPost.cpp:220]: (style) Condition '!ok' is always false @@ -51,7 +54,10 @@ [sources/device/DeviceController.cpp:311] -> [sources/device/DeviceController.cpp:313]: (style) Variable 'mCIsReady' is reassigned a value before the old one has been used. [sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationEditResponse.h:67] -> [sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationConfirmResponse.h:61]: (warning) The class 'MAdjustUltrafiltrationEditResponse' defines member variable with name 'stringPrefix' also defined in its parent class 'MAdjustUltrafiltrationConfirmResponse'. [sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationEditResponse.h:79] -> [sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationConfirmResponse.h:79]: (warning) The class 'MAdjustUltrafiltrationEditResponse' defines member variable with name '_data' also defined in its parent class 'MAdjustUltrafiltrationConfirmResponse'. -[sources/storage/Logger.cpp:188]: (style) The scope of the variable 'notified' 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/model/settings/MSettings.h:56]: (style) The KeyValue::operator= does not conform to standard C/C++ behaviour. To conform to standard C/C++ behaviour, return a reference to self (such as: 'KeyValue &KeyValue::operator=(..) { .. return *this; }'. For safety reasons it might be better to not fix this message. If you think that safety is always more important than conformance then please ignore/suppress this message. For more details about this topic, see the book "Effective C++" by Scott Meyers. +[sources/model/settings/MSettings.h:44]: (warning) The class 'KeyValue' has 'operator=' but lack of 'copy constructor'. +[sources/storage/Logger.cpp:259] -> [sources/storage/Logger.cpp:261]: (style) Variable 'ok' is reassigned a value before the old one has been used. +[sources/storage/Logger.cpp:189]: (style) The scope of the variable 'notified' 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; @@ -64,7 +70,6 @@ } } When you see this message it is always safe to reduce the variable scope 1 level. -[sources/storage/Logger.cpp]: (information) The configuration 'MIXED_EVENT_DATUM' was not checked because its code equals another one. [sources/view/VEventSpy.cpp]: (information) The configuration 'DEBUG_BCUFF_MIMIC' was not checked because its code equals another one. [sources/view/VTreatmentCreate.cpp:132]: (style) The function 'doCancel' is never used. [sources/view/settings/VNetworkModel.cpp:238]: (style) The function 'doCheckIfConnected' is never used. @@ -76,6 +81,9 @@ [sources/view/hd/adjustment/disinfect/VDisinfectAdjustDisinfect.cpp:132]: (style) The function 'doDisinfectConfirm' is never used. [sources/view/hd/adjustment/disinfect/VDisinfectAdjustDisinfect.cpp:109]: (style) The function 'doDisinfectFlush' is never used. [sources/view/hd/adjustment/disinfect/VDisinfectAdjustDisinfect.cpp:118]: (style) The function 'doDisinfectHeat' is never used. +[sources/gui/GuiView.cpp:250]: (style) The function 'doExportListInsert' is never used. +[sources/gui/GuiView.cpp:293]: (style) The function 'doExportListPercent' is never used. +[sources/gui/GuiView.cpp:281]: (style) The function 'doExportListSelect' is never used. [sources/view/VTreatmentCreate(legacy).cpp:520]: (style) The function 'doGetOperatingParameterNames' is never used. [sources/view/VTreatmentCreate(legacy).cpp:539]: (style) The function 'doGetOperatingParameterValues' is never used. [sources/view/VTreatmentCreate(legacy).cpp:487]: (style) The function 'doGetPrescriptionParameterNames' is never used. @@ -106,9 +114,9 @@ [sources/utility/types.cpp:28]: (style) The function 'floatCompare' is never used. [sources/utility/types.cpp:44]: (style) The function 'getBits' is never used. [sources/bluetooth/BluetoothInterface.cpp:1159]: (style) The function 'mimic' is never used. -[sources/storage/FileHandler.cpp:165]: (style) The function 'moveFolder' is never used. -[sources/storage/FileHandler.cpp:206]: (style) The function 'removeFiles' is never used. -[sources/storage/FileHandler.cpp:186]: (style) The function 'removeFolder' is never used. +[sources/storage/FileHandler.cpp:162]: (style) The function 'moveFolder' is never used. +[sources/storage/FileHandler.cpp:203]: (style) The function 'removeFiles' is never used. +[sources/storage/FileHandler.cpp:183]: (style) The function 'removeFolder' is never used. [sources/bluetooth/BluetoothInterface.cpp:1239]: (style) The function 'requestBattery' is never used. [sources/bluetooth/BluetoothInterface.cpp:1226]: (style) The function 'requestInformation' is never used. [sources/bluetooth/BluetoothInterface.cpp:1207]: (style) The function 'requestMeasurements' is never used.