diff --git a/src/coreclr/jit/emit.cpp b/src/coreclr/jit/emit.cpp index 9afbc4b39d2d4..f1f716d6de420 100644 --- a/src/coreclr/jit/emit.cpp +++ b/src/coreclr/jit/emit.cpp @@ -8361,7 +8361,7 @@ void emitter::emitDispDataSec(dataSecDsc* section, BYTE* dst) bool isRelative = (data->dsType == dataSection::blockRelative32); size_t blockCount = data->dsSize / (isRelative ? 4 : TARGET_POINTER_SIZE); - for (unsigned i = 0; i < blockCount; i++) + for (size_t i = 0; i < blockCount; i++) { if (i > 0) { diff --git a/src/coreclr/jit/lowerxarch.cpp b/src/coreclr/jit/lowerxarch.cpp index e2c4671974773..3adeccf516fd1 100644 --- a/src/coreclr/jit/lowerxarch.cpp +++ b/src/coreclr/jit/lowerxarch.cpp @@ -4845,8 +4845,6 @@ GenTree* Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) case TYP_INT: case TYP_UINT: { - unsigned N = 0; - GenTree* opN = nullptr; NamedIntrinsic insIntrinsic = NI_Illegal; if ((simdBaseType == TYP_SHORT) || (simdBaseType == TYP_USHORT)) @@ -4861,7 +4859,7 @@ GenTree* Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) if (insIntrinsic != NI_Illegal) { - for (N = 1; N < argCnt - 1; N++) + for (size_t N = 1; N < argCnt - 1; N++) { // We will be constructing the following parts: // ... @@ -4877,7 +4875,7 @@ GenTree* Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) // tmp1 = Sse?.Insert(tmp1, opN, N); // ... - opN = node->Op(N + 1); + GenTree* opN = node->Op(N + 1); idx = comp->gtNewIconNode(N, TYP_INT); // Place the insert as early as possible to avoid creating a lot of long lifetimes. @@ -4889,26 +4887,24 @@ GenTree* Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) LowerNode(tmp1); } - assert(N == (argCnt - 1)); - // We will be constructing the following parts: - // idx = CNS_INT int N - // /--* tmp1 simd16 - // +--* opN T - // +--* idx int + // idx = CNS_INT int (argCnt - 1) + // /--* tmp1 simd16 + // +--* lastOp T + // +--* idx int // node = * HWINTRINSIC simd16 T Insert // This is roughly the following managed code: // ... - // tmp1 = Sse?.Insert(tmp1, opN, N); + // tmp1 = Sse?.Insert(tmp1, lastOp, (argCnt - 1)); // ... - opN = node->Op(argCnt); + GenTree* lastOp = node->Op(argCnt); - idx = comp->gtNewIconNode(N, TYP_INT); - BlockRange().InsertAfter(opN, idx); + idx = comp->gtNewIconNode((argCnt - 1), TYP_INT); + BlockRange().InsertAfter(lastOp, idx); - node->ResetHWIntrinsicId(insIntrinsic, comp, tmp1, opN, idx); + node->ResetHWIntrinsicId(insIntrinsic, comp, tmp1, lastOp, idx); break; } @@ -4918,9 +4914,9 @@ GenTree* Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) GenTree* op[16]; op[0] = tmp1; - for (N = 1; N < argCnt; N++) + for (size_t N = 1; N < argCnt; N++) { - opN = node->Op(N + 1); + GenTree* opN = node->Op(N + 1); op[N] = InsertNewSimdCreateScalarUnsafeNode(TYP_SIMD16, opN, simdBaseJitType, 16); LowerNode(op[N]); @@ -4928,7 +4924,7 @@ GenTree* Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) if ((simdBaseType == TYP_BYTE) || (simdBaseType == TYP_UBYTE)) { - for (N = 0; N < argCnt; N += 4) + for (size_t N = 0; N < argCnt; N += 4) { // We will be constructing the following parts: // ... @@ -4958,9 +4954,9 @@ GenTree* Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) // tmp3 = Sse2.UnpackLow(tmp1, tmp2); // ... - unsigned O = N + 1; - unsigned P = N + 2; - unsigned Q = N + 3; + size_t O = N + 1; + size_t P = N + 2; + size_t Q = N + 3; tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, op[N], op[O], NI_SSE2_UnpackLow, CORINFO_TYPE_UBYTE, simdSize); diff --git a/src/coreclr/tools/superpmi/superpmi-shared/mclist.cpp b/src/coreclr/tools/superpmi/superpmi-shared/mclist.cpp index bea3ef6e93706..79dca0cdc766a 100644 --- a/src/coreclr/tools/superpmi/superpmi-shared/mclist.cpp +++ b/src/coreclr/tools/superpmi/superpmi-shared/mclist.cpp @@ -16,7 +16,7 @@ bool MCList::processArgAsMCL(char* input, int* count, int** list) size_t len = strlen(input); - for (unsigned int i = 0; (i < len) && isRangeList; i++) + for (size_t i = 0; (i < len) && isRangeList; i++) { if ((input[i] != '-') && (input[i] != ',') && (!isdigit((unsigned char)input[i]))) isRangeList = false; diff --git a/src/coreclr/tools/superpmi/superpmi/icorjitinfo.cpp b/src/coreclr/tools/superpmi/superpmi/icorjitinfo.cpp index 64c52f61705ae..3b9c00aba9568 100644 --- a/src/coreclr/tools/superpmi/superpmi/icorjitinfo.cpp +++ b/src/coreclr/tools/superpmi/superpmi/icorjitinfo.cpp @@ -1775,7 +1775,7 @@ int MyICJI::doAssert(const char* szFile, int iLine, const char* szExpr) sprintf_s(buff, sizeof(buff), "%s (%d) - %s", szFile, iLine, szExpr); LogIssue(ISSUE_ASSERT, "#%d %s", jitInstance->mc->index, buff); - jitInstance->mc->cr->recMessageLog(buff); + jitInstance->mc->cr->recMessageLog("%s", buff); // Under "/boa", ask the user if they want to attach a debugger. If they do, the debugger will be attached, // then we'll call DebugBreakorAV(), which will issue a __debugbreak() and actually cause