summaryrefslogtreecommitdiff
path: root/src/buildtool/file_system/git_cas.cpp
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2022-08-12 16:10:21 +0200
committerOliver Reiche <oliver.reiche@huawei.com>2022-09-13 10:51:13 +0200
commit9119de3a643f8adf2c4a12587e32577caa762b5a (patch)
treed1e01b98770002d5a27b0d95e317817fbf2eac40 /src/buildtool/file_system/git_cas.cpp
parent693173e3b0ff9ddf3018e42b4e880f5aa18a978a (diff)
downloadjustbuild-9119de3a643f8adf2c4a12587e32577caa762b5a.tar.gz
Fix build with gcc/g++
Diffstat (limited to 'src/buildtool/file_system/git_cas.cpp')
-rw-r--r--src/buildtool/file_system/git_cas.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/buildtool/file_system/git_cas.cpp b/src/buildtool/file_system/git_cas.cpp
index e24ab8ad..fcd56006 100644
--- a/src/buildtool/file_system/git_cas.cpp
+++ b/src/buildtool/file_system/git_cas.cpp
@@ -14,8 +14,8 @@ extern "C" {
namespace {
-constexpr auto kOIDRawSize{GIT_OID_RAWSZ};
-constexpr auto kOIDHexSize{GIT_OID_HEXSZ};
+constexpr std::size_t kOIDRawSize{GIT_OID_RAWSZ};
+constexpr std::size_t kOIDHexSize{GIT_OID_HEXSZ};
[[nodiscard]] auto GitLastError() noexcept -> std::string {
git_error const* err{nullptr};
@@ -102,6 +102,8 @@ constexpr auto kOIDHexSize{GIT_OID_HEXSZ};
case ObjectType::Tree:
return GIT_FILEMODE_TREE;
}
+
+ return GIT_FILEMODE_UNREADABLE; // make gcc happy
}
[[nodiscard]] auto GitTypeToObjectType(git_object_t const& type) noexcept