From ad75a4aa26f1474890024c4d2af6429097745321 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Fri, 15 Nov 2024 02:36:39 -0700 Subject: [PATCH] Fix warnings in coreclr/jit/compiler.cpp for non-Windows targets (#109830) 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. --- 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 b8a2da8b0c2e8..7acadfc8b6dd1 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) {