Skip to content

Commit

Permalink
Eliminate 'signed/unsigned int comparison' gcc warning in forward_exc…
Browse files Browse the repository at this point in the history
…eption

(fix of commit 642a4d1)

* 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.
  • Loading branch information
ivmai committed Jul 10, 2024
1 parent 879b7fa commit c0bc542
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion os_dep.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit c0bc542

Please sign in to comment.