From 0e014d663292cfa263f03eef554e7d1ddae00913 Mon Sep 17 00:00:00 2001 From: Phenom Date: Fri, 21 Jul 2017 12:43:06 +0200 Subject: [PATCH] Fix CppCheck in p3filelists.cc /libretroshare/src/file_sharing/hash_cache.h:57: warning: Cppcheck(noExplicitConstructor): Class 'HashStorage' has a constructor with 1 argument that is not explicit. /libretroshare/src/file_sharing/p3filelists.cc:375: warning: Cppcheck(unusedVariable): Unused variable: mit /libretroshare/src/file_sharing/p3filelists.cc:1530: warning: Cppcheck(unreadVariable): Variable 'indent' is assigned a value that is never used. --- libretroshare/src/file_sharing/p3filelists.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libretroshare/src/file_sharing/p3filelists.cc b/libretroshare/src/file_sharing/p3filelists.cc index 1a93f4350..bb5ba4e2f 100644 --- a/libretroshare/src/file_sharing/p3filelists.cc +++ b/libretroshare/src/file_sharing/p3filelists.cc @@ -437,14 +437,14 @@ bool p3FileDatabase::loadList(std::list& load) if (NULL != (rskv = dynamic_cast(*it))) { /* make into map */ - std::map configMap; - std::map::const_iterator mit ; + //std::map configMap; + //std::map::const_iterator mit ; for(std::list::const_iterator kit = rskv->tlvkvs.pairs.begin(); kit != rskv->tlvkvs.pairs.end(); ++kit) if (kit->key == HASH_CACHE_DURATION_SS) { uint32_t t=0 ; - if(sscanf(kit->value.c_str(),"%d",&t) == 1) + if(sscanf(kit->value.c_str(),"%u",&t) == 1) mHashCache->setRememberHashFilesDuration(t); } else if(kit->key == WATCH_FILE_DURATION_SS) @@ -1744,7 +1744,7 @@ void p3FileDatabase::locked_recursSweepRemoteDirectory(RemoteDirectoryStorage *r { time_t now = time(NULL) ; - std::string indent(2*depth,' ') ; + //std::string indent(2*depth,' ') ; // if not up to date, request update, and return (content is not certified, so no need to recurs yet). // if up to date, return, because TS is about the last modif TS below, so no need to recurs either.