From 6b994b17377349141aeb0b6e1c8b9f1894232537 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Mon, 13 Apr 2026 22:13:29 +0200 Subject: [PATCH] Fix some warnings raised by MSVC --- src/asm/lexer.cpp | 2 +- src/link/sdas_obj.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/asm/lexer.cpp b/src/asm/lexer.cpp index 6739e90a..8801093d 100644 --- a/src/asm/lexer.cpp +++ b/src/asm/lexer.cpp @@ -358,7 +358,7 @@ void LexerState::setFileAsNextState(std::string const &filePath, bool updateStat fatal("Failed to read file \"%s\": %s", path.c_str(), strerror(errno)); // LCOV_EXCL_STOP } - content.emplace(ptr, size); + content.emplace(ptr, static_cast(size)); // LCOV_EXCL_START verbosePrint(VERB_INFO, "File \"%s\" is fully read\n", path.c_str()); diff --git a/src/link/sdas_obj.cpp b/src/link/sdas_obj.cpp index 35dd5b25..134ff7c3 100644 --- a/src/link/sdas_obj.cpp +++ b/src/link/sdas_obj.cpp @@ -661,8 +661,8 @@ void sdobj_ReadFile(FileStackNode const &src, FILE *file, std::vector &f patch.rpnExpression[0] = RPN_BANK_SYM; patch.rpnExpression[1] = idx; patch.rpnExpression[2] = idx >> 8; - patch.rpnExpression[3] = idx >> 16; - patch.rpnExpression[4] = idx >> 24; + patch.rpnExpression[3] = 0; + patch.rpnExpression[4] = 0; } else if (sym.name.starts_with("l_")) { patch.rpnExpression.resize(1 + sym.name.length() - 2 + 1); patch.rpnExpression[0] = RPN_SIZEOF_SECT; @@ -684,8 +684,8 @@ void sdobj_ReadFile(FileStackNode const &src, FILE *file, std::vector &f patch.rpnExpression[0] = RPN_SYM; patch.rpnExpression[1] = idx; patch.rpnExpression[2] = idx >> 8; - patch.rpnExpression[3] = idx >> 16; - patch.rpnExpression[4] = idx >> 24; + patch.rpnExpression[3] = 0; + patch.rpnExpression[4] = 0; } } else { if (idx >= fileSections.size()) {