From 3d6faf403b91767816be7b8ad8cf4159708ad9ca Mon Sep 17 00:00:00 2001 From: Merry Date: Sun, 27 Nov 2022 14:19:06 +0000 Subject: [PATCH] test_generator: Minor fixups --- tests/test_generator.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_generator.cpp b/tests/test_generator.cpp index c0d7d6e4..58d5c088 100644 --- a/tests/test_generator.cpp +++ b/tests/test_generator.cpp @@ -143,7 +143,7 @@ bool ShouldTestA32Inst(u32 instruction, u32 pc, bool is_thumb, bool is_last_inst return ShouldTestInst(block); } -bool ShouldTestA64Inst(u32 instruction, u32 pc, bool is_last_inst) { +bool ShouldTestA64Inst(u32 instruction, u64 pc, bool is_last_inst) { const A64::LocationDescriptor location = A64::LocationDescriptor{pc, {}}; IR::Block block{location}; const bool should_continue = A64::TranslateSingleInstruction(block, location, instruction); @@ -650,7 +650,7 @@ static std::optional str2sz(char const* s) { errno = 0; const long l = std::strtol(s, &end, 10); - if (errno == ERANGE || l > std::numeric_limits::max() || l < 0) { + if (errno == ERANGE || l < 0) { return std::nullopt; } if (*s == '\0' || *end != '\0') { @@ -673,7 +673,7 @@ int main(int argc, char* argv[]) { return 1; } - detail::g_rand_int_generator.seed(*seed); + detail::g_rand_int_generator.seed(static_cast(*seed)); if (strcmp(argv[1], "thumb") == 0) { TestThumb(*instruction_count, *iterator_count);