From e3c12830174d6132a83fbe646d584254f78acb2e Mon Sep 17 00:00:00 2001 From: Abdelrahman Said Date: Mon, 15 Dec 2025 19:48:58 +0000 Subject: [PATCH] Cast to avoid MSVC warnings --- src/core/file/file.c | 3 ++- src/primitives/strings/str8/str8.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/file/file.c b/src/core/file/file.c index e1f6eb6..86a8bd5 100644 --- a/src/core/file/file.c +++ b/src/core/file/file.c @@ -43,7 +43,8 @@ u64 wapp_file_get_current_position(File *file) { i32 wapp_file_seek(File *file, u64 offset, FileSeekOrigin origin) { wapp_debug_assert(file != NULL, "`file` should not be NULL."); - return fseek(file, offset, origin); + // TODO (Abdelrahman): Revisit conversion to long + return fseek(file, (long)offset, origin); } u64 wapp_file_get_length(File *file) { diff --git a/src/primitives/strings/str8/str8.c b/src/primitives/strings/str8/str8.c index f041d3c..79f7e46 100644 --- a/src/primitives/strings/str8/str8.c +++ b/src/primitives/strings/str8/str8.c @@ -247,7 +247,7 @@ void wapp_str8_to_lower(Str8 *dst, Str8RO *src) { dst->size = src->size; for (u64 i = 0; i < src->size; ++i) { - wapp_str8_set(dst, i, tolower(wapp_str8_get(src, i))); + wapp_str8_set(dst, i, (u8)tolower(wapp_str8_get(src, i))); } } @@ -257,7 +257,7 @@ void wapp_str8_to_upper(Str8 *dst, Str8RO *src) { dst->size = src->size; for (u64 i = 0; i < src->size; ++i) { - wapp_str8_set(dst, i, toupper(wapp_str8_get(src, i))); + wapp_str8_set(dst, i, (u8)toupper(wapp_str8_get(src, i))); } }