diff options
| author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-01-08 16:34:43 +0000 | 
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-01-08 16:34:43 +0000 | 
| commit | 8cd0977a3688fa705c83867c57505a47b9269369 (patch) | |
| tree | b7b48711051299607077ed31fdf3b3f6dd6cc41f /lib | |
| parent | Tidy shadow map creation (diff) | |
| download | ilt-8cd0977a3688fa705c83867c57505a47b9269369.tar.bz2 ilt-8cd0977a3688fa705c83867c57505a47b9269369.tar.xz ilt-8cd0977a3688fa705c83867c57505a47b9269369.zip  | |
Fix up all the static analyzer warnings
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/enumDetails.hpp | 5 | ||||
| -rw-r--r-- | lib/filesystem.cpp | 1 | 
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) {  | 
