diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2022-09-13 15:18:46 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2022-09-21 11:44:09 +0900 |
commit | 406ebb25a017dba5b066a42a1c325e57fa644e95 (patch) | |
tree | d99d74e5f085b06f48925ba8c7c13b442ff15852 /ractor.c | |
parent | 104069e75a385d9b04c86cd31f2aa60547ad6a55 (diff) | |
download | ruby-406ebb25a017dba5b066a42a1c325e57fa644e95.tar.gz |
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.
Diffstat (limited to 'ractor.c')
-rw-r--r-- | ractor.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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++; } } |