From 1ff544358cca129bee1b9f60d1cc396751c2e1f6 Mon Sep 17 00:00:00 2001 From: Martin Ridgers Date: Wed, 29 Sep 2021 15:43:08 +0200 Subject: Fixed signed/unsigned mismatched warnings from GCC --- zencore/blake3.cpp | 4 +++- zencore/filesystem.cpp | 2 +- zencore/string.cpp | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/zencore/blake3.cpp b/zencore/blake3.cpp index 663f21b6d..5869f19a3 100644 --- a/zencore/blake3.cpp +++ b/zencore/blake3.cpp @@ -8,7 +8,9 @@ #include #include "../3rdparty/BLAKE3/c/blake3.h" -#pragma comment(lib, "blake3.lib") +#if ZEN_PLATFORM_WINDOWS +# pragma comment(lib, "blake3.lib") +#endif #include diff --git a/zencore/filesystem.cpp b/zencore/filesystem.cpp index e42f94550..b5733c4ed 100644 --- a/zencore/filesystem.cpp +++ b/zencore/filesystem.cpp @@ -498,7 +498,7 @@ WriteFile(std::filesystem::path Path, const IoBuffer* const* Data, size_t Buffer ThrowSystemException(hRes, "File write failed for '{}'"_format(Path).c_str()); } #else - if (write(Fd, DataPtr, WriteSize) != WriteSize) + if (write(Fd, DataPtr, WriteSize) != int64_t(WriteSize)) { ThrowLastError("File write failed for '{}'"_format(Path)); } diff --git a/zencore/string.cpp b/zencore/string.cpp index 6dcdc9542..df387dc3c 100644 --- a/zencore/string.cpp +++ b/zencore/string.cpp @@ -76,7 +76,7 @@ FilepathFindExtension(const std::string_view& Path, const char* ExtensionToMatch // Look for extension introducer ('.') - for (size_t i = PathLen - 1; i >= 0; --i) + for (ssize_t i = PathLen - 1; i >= 0; --i) { if (Path[i] == '.') return Path.data() + i; -- cgit v1.2.3