Fix some warnings raised by MSVC

This commit is contained in:
ISSOtm
2026-04-13 22:13:29 +02:00
committed by Eldred Habert
parent 0849eb801e
commit 6b994b1737
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -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<ViewedContent>(ptr, size);
content.emplace<ViewedContent>(ptr, static_cast<size_t>(size));
// LCOV_EXCL_START
verbosePrint(VERB_INFO, "File \"%s\" is fully read\n", path.c_str());
+4 -4
View File
@@ -661,8 +661,8 @@ void sdobj_ReadFile(FileStackNode const &src, FILE *file, std::vector<Symbol> &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<Symbol> &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()) {