From 4ac149951b2020b4a6dafb0455d3f523e7c9cfe6 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 15 Feb 2022 17:34:51 +0000 Subject: Fix up all warnings from all the tools --- src/dir.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/dir.cpp') diff --git a/src/dir.cpp b/src/dir.cpp index 9e524aa..f502c45 100644 --- a/src/dir.cpp +++ b/src/dir.cpp @@ -1,7 +1,16 @@ #include "dir.h" +#include "git.h" #include "repo.h" +#include #include +#include +#include +#include +#include +#include #include +#include +#include GitFS::Directory::Directory(Repo * const r, std::string && p) : repo(r), path(std::move(p)), subTreeCacheRootId({}) { @@ -39,7 +48,7 @@ GitFS::Directory::readdir(const ::Ice::Current &) { const auto subTree = getSubtree(); NetFS::NameList list; - for (int idx = git_tree_entrycount(subTree.get()); idx--;) { + for (auto idx = git_tree_entrycount(subTree.get()); idx--;) { const auto entry = git_tree_entry_byindex(subTree.get(), idx); list.push_back(git_tree_entry_name(entry)); } @@ -51,7 +60,7 @@ GitFS::Directory::listdir(const ::Ice::Current &) { const auto subTree = getSubtree(); NetFS::DirectoryContents list; - for (int idx = git_tree_entrycount(subTree.get()); idx--;) { + for (auto idx = git_tree_entrycount(subTree.get()); idx--;) { const auto entry = git_tree_entry_byindex(subTree.get(), idx); NetFS::Attr a {}; a << *entry << *repo->commit; -- cgit v1.2.3