From 448ca88bfd17e33380152f116ad2745349085641 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 8 Oct 2023 08:11:56 +0200 Subject: [PATCH] fixed some signed-ness issues. --- src/common/filesystem/source/files_decompress.cpp | 3 +-- src/common/utility/zstring.h | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/common/filesystem/source/files_decompress.cpp b/src/common/filesystem/source/files_decompress.cpp index 6b32bf660..c5552018f 100644 --- a/src/common/filesystem/source/files_decompress.cpp +++ b/src/common/filesystem/source/files_decompress.cpp @@ -540,7 +540,6 @@ public: } uint8_t header[12]; - int err; File = file; Size = uncompressed_size; @@ -553,7 +552,7 @@ public: return false; } - File->Seek(-sizeof(header), FileReader::SeekCur); + File->Seek(-(ptrdiff_t)sizeof(header), FileReader::SeekCur); FillBuffer(); diff --git a/src/common/utility/zstring.h b/src/common/utility/zstring.h index b76113f00..dfbe47706 100644 --- a/src/common/utility/zstring.h +++ b/src/common/utility/zstring.h @@ -324,13 +324,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 {