diff options
| author | Martin Ridgers <[email protected]> | 2021-09-29 15:43:08 +0200 |
|---|---|---|
| committer | Martin Ridgers <[email protected]> | 2021-09-29 16:57:32 +0200 |
| commit | 1ff544358cca129bee1b9f60d1cc396751c2e1f6 (patch) | |
| tree | aaec1585c2042059ef37ff725a05b088b873cceb | |
| parent | Prevent mesh tests to crash by moving behind define. (diff) | |
| download | zen-1ff544358cca129bee1b9f60d1cc396751c2e1f6.tar.xz zen-1ff544358cca129bee1b9f60d1cc396751c2e1f6.zip | |
Fixed signed/unsigned mismatched warnings from GCC
| -rw-r--r-- | zencore/blake3.cpp | 4 | ||||
| -rw-r--r-- | zencore/filesystem.cpp | 2 | ||||
| -rw-r--r-- | 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 <zencore/zencore.h> #include "../3rdparty/BLAKE3/c/blake3.h" -#pragma comment(lib, "blake3.lib") +#if ZEN_PLATFORM_WINDOWS +# pragma comment(lib, "blake3.lib") +#endif #include <string.h> 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; |