From 9aaa21dde5da67c5b686d49a8ef38c982410e899 Mon Sep 17 00:00:00 2001 From: Andrew Au Date: Thu, 20 Oct 2022 11:57:06 -0700 Subject: [PATCH] Fix a signed/unsigned comparison warning (#77230) --- src/coreclr/nativeaot/Runtime/GCMemoryHelpers.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/nativeaot/Runtime/GCMemoryHelpers.inl b/src/coreclr/nativeaot/Runtime/GCMemoryHelpers.inl index 8bf7eb68585cf..e632a78ecb3e1 100644 --- a/src/coreclr/nativeaot/Runtime/GCMemoryHelpers.inl +++ b/src/coreclr/nativeaot/Runtime/GCMemoryHelpers.inl @@ -238,7 +238,7 @@ FORCEINLINE void InlinedBulkWriteBarrier(void* pMemStart, size_t cbMemSize) // heap validation. uintptr_t* realSlot = (uintptr_t*)pMemStart; - uintptr_t slotCount = cbMemSize / sizeof(uintptr_t); + ptrdiff_t slotCount = (ptrdiff_t)(cbMemSize / sizeof(uintptr_t)); ASSERT(slotCount < (uintptr_t*)g_GCShadowEnd - shadowSlot); do {