1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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.
This commit is contained in:
卜部昌平 2022-09-13 15:18:46 +09:00
parent 104069e75a
commit 406ebb25a0
Notes: git 2022-09-21 11:44:36 +09:00

View file

@ -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++;
}
}