mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-14 08:59:50 -05:00
Fix CppCheck in dir_hierarchy.h and dir_hierarchy.cc
/libretroshare/src/file_sharing/dir_hierarchy.cc:883: warning: Cppcheck(unreadVariable): Variable 'nunknown' is modified but its new value is never used. /libretroshare/src/file_sharing/dir_hierarchy.h:71: warning: Cppcheck(noExplicitConstructor): Class 'DirEntry' has a constructor with 1 argument that is not explicit. /libretroshare/src/file_sharing/dir_hierarchy.cc:1056: warning: Cppcheck(noExplicitConstructor): Class 'read_error' has a constructor with 1 argument that is not explicit.
This commit is contained in:
parent
b42694165a
commit
1456bdd641
@ -887,7 +887,10 @@ void InternalFileHierarchyStorage::print() const
|
||||
std::cerr << "(EE) Error: unknown type node found!" << std::endl;
|
||||
}
|
||||
|
||||
std::cerr << "Total nodes: " << mNodes.size() << " (" << nfiles << " files, " << ndirs << " dirs, " << nempty << " empty slots)" << std::endl;
|
||||
std::cerr << "Total nodes: " << mNodes.size() << " (" << nfiles << " files, " << ndirs << " dirs, " << nempty << " empty slots";
|
||||
if (nunknown > 0) std::cerr << ", " << nunknown << " unknown";
|
||||
std::cerr << ")" << std::endl;
|
||||
|
||||
|
||||
recursPrint(0,DirectoryStorage::EntryIndex(0));
|
||||
|
||||
|
@ -68,7 +68,7 @@ public:
|
||||
class DirEntry: public FileStorageNode
|
||||
{
|
||||
public:
|
||||
DirEntry(const std::string& name) : dir_name(name), dir_modtime(0),dir_most_recent_time(0),dir_update_time(0) {}
|
||||
explicit DirEntry(const std::string& name) : dir_name(name), dir_modtime(0),dir_most_recent_time(0),dir_update_time(0) {}
|
||||
virtual ~DirEntry() {}
|
||||
|
||||
virtual uint32_t type() const { return FileStorageNode::TYPE_DIR ; }
|
||||
|
Loading…
Reference in New Issue
Block a user