From 1859a902e06908c3de1d9ffeb05bbee04bb83778 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sun, 8 Oct 2023 08:52:11 +1100 Subject: [PATCH] - Fix some warnings in MSVC. --- source/common/filesystem/source/files_decompress.cpp | 1 - source/common/utility/zstring.h | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/source/common/filesystem/source/files_decompress.cpp b/source/common/filesystem/source/files_decompress.cpp index 6b32bf660..e6ba72b30 100644 --- a/source/common/filesystem/source/files_decompress.cpp +++ b/source/common/filesystem/source/files_decompress.cpp @@ -540,7 +540,6 @@ public: } uint8_t header[12]; - int err; File = file; Size = uncompressed_size; diff --git a/source/common/utility/zstring.h b/source/common/utility/zstring.h index 7777bbf61..07c6564bf 100644 --- a/source/common/utility/zstring.h +++ b/source/common/utility/zstring.h @@ -326,13 +326,13 @@ public: int Compare (const FString &other) const { return strcmp (Chars, other.Chars); } int Compare (const char *other) const { return strcmp (Chars, other); } - int Compare(const FString &other, int len) const { return strncmp(Chars, other.Chars, len); } - int Compare(const char *other, int len) const { return strncmp(Chars, other, len); } + int Compare(const FString &other, size_t len) const { return strncmp(Chars, other.Chars, len); } + int Compare(const char *other, size_t len) const { return strncmp(Chars, other, len); } int CompareNoCase (const FString &other) const { return stricmp (Chars, other.Chars); } int CompareNoCase (const char *other) const { return stricmp (Chars, other); } - int CompareNoCase(const FString &other, int len) const { return strnicmp(Chars, other.Chars, len); } - int CompareNoCase(const char *other, int len) const { return strnicmp(Chars, other, len); } + int CompareNoCase(const FString &other, size_t len) const { return strnicmp(Chars, other.Chars, len); } + int CompareNoCase(const char *other, size_t len) const { return strnicmp(Chars, other, len); } enum EmptyTokenType {