From 0d5b1ed40b5d9e257b9a0bcc0ed608bdf4e2a802 Mon Sep 17 00:00:00 2001 From: Phenom Date: Fri, 21 Jul 2017 12:47:04 +0200 Subject: [PATCH] Fix CppCheck in rsfilelistitems.h /libretroshare/src/file_sharing/rsfilelistitems.h:78: warning: Cppcheck(uninitMemberVar): Member variable 'RsFileListsSyncRequestItem::flags' is not initialized in the constructor. /libretroshare/src/file_sharing/rsfilelistitems.h:78: warning: Cppcheck(uninitMemberVar): Member variable 'RsFileListsSyncRequestItem::last_known_recurs_modf_TS' is not initialized in the constructor. /libretroshare/src/file_sharing/rsfilelistitems.h:78: warning: Cppcheck(uninitMemberVar): Member variable 'RsFileListsSyncRequestItem::request_id' is not initialized in the constructor. /libretroshare/src/file_sharing/rsfilelistitems.h:94: warning: Cppcheck(uninitMemberVar): Member variable 'RsFileListsSyncResponseItem::flags' is not initialized in the constructor. /libretroshare/src/file_sharing/rsfilelistitems.h:94: warning: Cppcheck(uninitMemberVar): Member variable 'RsFileListsSyncResponseItem::last_known_recurs_modf_TS' is not initialized in the constructor. /libretroshare/src/file_sharing/rsfilelistitems.h:94: warning: Cppcheck(uninitMemberVar): Member variable 'RsFileListsSyncResponseItem::request_id' is not initialized in the constructor. /libretroshare/src/file_sharing/rsfilelistitems.h:52: warning: Cppcheck(noExplicitConstructor): Class 'RsFileListsItem' has a constructor with 1 argument that is not explicit. --- libretroshare/src/file_sharing/rsfilelistitems.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libretroshare/src/file_sharing/rsfilelistitems.h b/libretroshare/src/file_sharing/rsfilelistitems.h index 51e40b9c3..2f04a84a5 100644 --- a/libretroshare/src/file_sharing/rsfilelistitems.h +++ b/libretroshare/src/file_sharing/rsfilelistitems.h @@ -49,7 +49,7 @@ const uint8_t RS_PKT_SUBTYPE_FILELISTS_CONFIG_ITEM = 0x03; class RsFileListsItem : public RsItem { public: - RsFileListsItem(uint8_t subtype) + explicit RsFileListsItem(uint8_t subtype) : RsItem(RS_PKT_VERSION_SERVICE, RS_SERVICE_TYPE_FILE_DATABASE, subtype) { setPriorityLevel(QOS_PRIORITY_RS_SLOW_SYNC_REQUEST); // this is the default. Someitems may be faster, on demand. @@ -75,7 +75,7 @@ class RsFileListsSyncRequestItem : public RsFileListsItem { public: - RsFileListsSyncRequestItem() : RsFileListsItem(RS_PKT_SUBTYPE_FILELISTS_SYNC_REQ_ITEM) {} + RsFileListsSyncRequestItem() : RsFileListsItem(RS_PKT_SUBTYPE_FILELISTS_SYNC_REQ_ITEM), flags(0), last_known_recurs_modf_TS(0), request_id(0) {} virtual void clear(){} @@ -91,7 +91,7 @@ class RsFileListsSyncResponseItem : public RsFileListsItem { public: - RsFileListsSyncResponseItem() : RsFileListsItem(RS_PKT_SUBTYPE_FILELISTS_SYNC_RSP_ITEM) {} + RsFileListsSyncResponseItem() : RsFileListsItem(RS_PKT_SUBTYPE_FILELISTS_SYNC_RSP_ITEM), flags(0), last_known_recurs_modf_TS(0), request_id(0) {} virtual void clear();