summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/enumDetails.hpp5
-rw-r--r--lib/filesystem.cpp1
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/enumDetails.hpp b/lib/enumDetails.hpp
index 7234c6d..5966be2 100644
--- a/lib/enumDetails.hpp
+++ b/lib/enumDetails.hpp
@@ -79,7 +79,10 @@ private:
constexpr static auto
get_valids(std::integer_sequence<int, n...>)
{
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wconversion"
return std::array {EnumValueDetails<static_cast<E>(n)>::valid...};
+#pragma GCC diagnostic pop
}
template<auto... n>
constexpr static auto
@@ -103,7 +106,7 @@ private:
-> std::optional<typename std::decay_t<decltype(out)>::value_type>
{
if (const auto itr = std::find(search.begin(), search.end(), key); itr != search.end()) {
- return out[std::distance(search.begin(), itr)];
+ return out[static_cast<std::size_t>(std::distance(search.begin(), itr))];
}
return std::nullopt;
}
diff --git a/lib/filesystem.cpp b/lib/filesystem.cpp
index 181fb07..0e19e8d 100644
--- a/lib/filesystem.cpp
+++ b/lib/filesystem.cpp
@@ -36,6 +36,7 @@ namespace filesystem {
}
}
+ // NOLINTNEXTLINE(hicpp-vararg)
fh::fh(const char * path, int flags, int mode) : h {open(path, flags, mode)}
{
if (h == -1) {