From 406ebb25a017dba5b066a42a1c325e57fa644e95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Tue, 13 Sep 2022 15:18:46 +0900 Subject: obj_refer_only_sharables_p_i: need derefernce Clang says "warning: variable 'pcnt' set but not used" here. In fact it doesn't. The intention is clear that we want to increment cnt, not pcnt. Adding a * mark solves everything. --- ractor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ractor.c') diff --git a/ractor.c b/ractor.c index 0eddc165fa..3bd6c04af0 100644 --- a/ractor.c +++ b/ractor.c @@ -2685,7 +2685,7 @@ obj_refer_only_shareables_p_i(VALUE obj, void *ptr) int *pcnt = (int *)ptr; if (!rb_ractor_shareable_p(obj)) { - pcnt++; + *pcnt++; } } -- cgit v1.2.3