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/blob.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/blob.cpp') diff --git a/src/blob.cpp b/src/blob.cpp index e3483b8..a5482df 100644 --- a/src/blob.cpp +++ b/src/blob.cpp @@ -1,7 +1,14 @@ #include "blob.h" #include "repo.h" +#include #include +#include +#include +#include +#include +#include #include +#include GitFS::Blob::Blob(const Repo * const r, std::string && path) : repo(r), entry(Git::TreeEntryByPath(repo->tree, path)), blob(getBlob()), blobSize(git_blob_rawsize(blob.get())), @@ -43,13 +50,13 @@ GitFS::Blob::fgetattr(ReqEnv, const ::Ice::Current &) NetFS::Buffer GitFS::Blob::read(long long int o, long long int s, const ::Ice::Current &) { - const decltype(blobSize) offset(o); - const decltype(blobSize) size(s); + const auto offset {static_cast(o)}; + const auto size {static_cast(s)}; if (offset > blobSize) { return {}; } auto len = std::min(blobSize - offset, size); - return NetFS::Buffer(blobContent + offset, blobContent + offset + len); + return {blobContent + offset, blobContent + offset + len}; } void -- cgit v1.2.3