From 9666ca3c70192002c89130913205458db0a3d334 Mon Sep 17 00:00:00 2001 From: Sven van Haastregt Date: Tue, 23 Aug 2022 18:02:33 +0100 Subject: [PATCH] [NFC] Fix sign-compare warnings in math_brute_force (#1467) Signed-off-by: Sven van Haastregt --- test_conformance/math_brute_force/main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test_conformance/math_brute_force/main.cpp b/test_conformance/math_brute_force/main.cpp index d1d146a1..45b6e97d 100644 --- a/test_conformance/math_brute_force/main.cpp +++ b/test_conformance/math_brute_force/main.cpp @@ -129,8 +129,9 @@ static int doTest(const char *name) const Func *const temp_func = functionList + i; if (strcmp(temp_func->name, name) == 0) { - if ((gStartTestNumber != -1 && i < gStartTestNumber) - || i > gEndTestNumber) + if ((gStartTestNumber != -1 + && static_cast(i) < gStartTestNumber) + || static_cast(i) > gEndTestNumber) { vlog("Skipping function #%d\n", i); return 0; @@ -524,7 +525,7 @@ static int ParseArgs(int argc, const char **argv) static void PrintFunctions(void) { vlog("\nMath function names:\n"); - for (int i = 0; i < functionListCount; i++) + for (size_t i = 0; i < functionListCount; i++) { vlog("\t%s\n", functionList[i].name); }