From c0bc5423f4ab489640e151b943aa0e646a5d65f5 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Wed, 10 Jul 2024 21:26:41 +0300 Subject: [PATCH] Eliminate 'signed/unsigned int comparison' gcc warning in forward_exception (fix of commit 642a4d1f2) * os_dep.c [MPROTECT_VDB && DARWIN] (GC_forward_exception): Cast GC_old_exc_ports.count to size_t in comparison to i and do not cast i. --- os_dep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os_dep.c b/os_dep.c index d75c89b44..2a8e27467 100644 --- a/os_dep.c +++ b/os_dep.c @@ -4924,7 +4924,7 @@ STATIC kern_return_t GC_forward_exception(mach_port_t thread, mach_port_t task, thread_state_data_t thread_state; mach_msg_type_number_t thread_state_count = THREAD_STATE_MAX; - for (i = 0; (int)i < GC_old_exc_ports.count; i++) { + for (i = 0; i < (size_t)GC_old_exc_ports.count; i++) { if ((GC_old_exc_ports.masks[i] & ((exception_mask_t)1 << exception)) != 0) break; }