From d34fb9ad4bcaddeb5e7cfca6a31706ad172b15b6 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Fri, 12 Jul 2024 09:03:50 -0600 Subject: [PATCH] fix warnings in coreclr/jit/compiler.cpp for non-Windows targets This change was extracted from https://github.com/dotnet/runtimelab/pull/2614, which includes various fixes to enable building on non-Windows systems. We're in the process of upstreaming the parts of that PR which are not specific to NativeAOT-LLVM, and this is the latest such change. Signed-off-by: Joel Dice --- src/coreclr/jit/compiler.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/coreclr/jit/compiler.cpp b/src/coreclr/jit/compiler.cpp index b8a2da8b0c2e8e..7acadfc8b6dd19 100644 --- a/src/coreclr/jit/compiler.cpp +++ b/src/coreclr/jit/compiler.cpp @@ -1447,7 +1447,7 @@ void DisplayNowayAssertMap() for (i = 0; i < count; i++) { - fprintf(fout, "%u, %s, %u, \"%s\"\n", nacp[i].count, nacp[i].fl.m_file, nacp[i].fl.m_line, + fprintf(fout, "%zu, %s, %u, \"%s\"\n", nacp[i].count, nacp[i].fl.m_file, nacp[i].fl.m_line, nacp[i].fl.m_condStr); } @@ -3305,7 +3305,7 @@ void Compiler::compInitOptions(JitFlags* jitFlags) compMaxUncheckedOffsetForNullObject = (size_t)JitConfig.JitMaxUncheckedOffset(); if (verbose) { - printf("STRESS_NULL_OBJECT_CHECK: compMaxUncheckedOffsetForNullObject=0x%X\n", + printf("STRESS_NULL_OBJECT_CHECK: compMaxUncheckedOffsetForNullObject=0x%zX\n", compMaxUncheckedOffsetForNullObject); } } @@ -9351,7 +9351,7 @@ void dumpConvertedVarSet(Compiler* comp, VARSET_VALARG_TP vars) bool first = true; printf("{"); - for (size_t varNum = 0; varNum < comp->lvaCount; varNum++) + for (unsigned varNum = 0; varNum < comp->lvaCount; varNum++) { if (pVarNumSet[varNum] == 1) {