From dd232a3721f15ed26efacbf5249dc34aa64c7f7e Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 5 May 2023 19:39:46 +0300 Subject: [PATCH] Fix compiler warnings --- Core/Memory/MemoryManager.cpp | 2 +- FileSystem/FS/ustar.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/Memory/MemoryManager.cpp b/Core/Memory/MemoryManager.cpp index b76eb6f6..3f643e45 100644 --- a/Core/Memory/MemoryManager.cpp +++ b/Core/Memory/MemoryManager.cpp @@ -60,7 +60,7 @@ namespace Memory else if (Whence == SEEK_CUR) { NewOffset = node->Offset + Offset; - if (NewOffset > node->Length || NewOffset < 0) + if ((size_t)NewOffset > node->Length || NewOffset < 0) return -1; node->Offset = NewOffset; } diff --git a/FileSystem/FS/ustar.cpp b/FileSystem/FS/ustar.cpp index 6adb5f2a..b97e1450 100644 --- a/FileSystem/FS/ustar.cpp +++ b/FileSystem/FS/ustar.cpp @@ -50,7 +50,7 @@ namespace VirtualFileSystem else if (Whence == SEEK_CUR) { NewOffset = node->Offset + Offset; - if (NewOffset > node->Length || NewOffset < 0) + if ((size_t)NewOffset > node->Length || NewOffset < 0) return -1; node->Offset = NewOffset; }