From f18a842d9d7acc91dfd60082fb26dfee0ac0443b Mon Sep 17 00:00:00 2001 From: Phenom Date: Fri, 21 Jul 2017 12:27:45 +0200 Subject: [PATCH] Fix CppCheck in directory_storage.h and directory_storage.cc /libretroshare/src/file_sharing/directory_storage.h:100: warning: Cppcheck(noExplicitConstructor): Class 'FileIterator' has a constructor with 1 argument that is not explicit. /libretroshare/src/file_sharing/directory_storage.cc:579: warning: Cppcheck(unusedVariable): Unused variable: peers --- libretroshare/src/file_sharing/directory_storage.cc | 2 +- libretroshare/src/file_sharing/directory_storage.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libretroshare/src/file_sharing/directory_storage.cc b/libretroshare/src/file_sharing/directory_storage.cc index 8a58ec0fc..eb3c58626 100644 --- a/libretroshare/src/file_sharing/directory_storage.cc +++ b/libretroshare/src/file_sharing/directory_storage.cc @@ -576,7 +576,7 @@ bool LocalDirectoryStorage::getFileInfo(DirectoryStorage::EntryIndex i,FileInfo& info.transfered = 0; info.tfRate = 0; /* in kbytes */ info.downloadStatus = FT_STATE_COMPLETE ; - std::list peers; + //std::list peers; info.priority = SPEED_NORMAL; info.lastTS = 0; diff --git a/libretroshare/src/file_sharing/directory_storage.h b/libretroshare/src/file_sharing/directory_storage.h index 91e67fcff..22377bb0b 100644 --- a/libretroshare/src/file_sharing/directory_storage.h +++ b/libretroshare/src/file_sharing/directory_storage.h @@ -97,7 +97,7 @@ class DirectoryStorage class FileIterator { public: - FileIterator(DirIterator& d); // crawls all files in specified directory + explicit FileIterator(DirIterator& d); // crawls all files in specified directory FileIterator(DirectoryStorage *d,EntryIndex e); // crawls all files in specified directory FileIterator& operator++() ;