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

Cast to void pointer for %p in commented out code [ci skip]

This commit is contained in:
Nobuyoshi Nakada 2021-10-03 12:02:58 +09:00
parent 7c01cf4908
commit 768ceb4ead
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6
3 changed files with 10 additions and 9 deletions

View file

@ -2138,7 +2138,7 @@ found_mach_header:
char *strtab = file + cmd->stroff, *sname = 0;
uint32_t j;
uintptr_t saddr = 0;
/* kprintf("[%2d]: %x/symtab %p\n", i, cmd->cmd, p); */
/* kprintf("[%2d]: %x/symtab %p\n", i, cmd->cmd, (void *)p); */
for (j = 0; j < cmd->nsyms; j++) {
uintptr_t symsize, d;
struct LP(nlist) *e = &nl[j];

View file

@ -1181,11 +1181,11 @@ debug_list(ISEQ_ARG_DECLARE LINK_ANCHOR *const anchor, LINK_ELEMENT *cur)
{
LINK_ELEMENT *list = FIRST_ELEMENT(anchor);
printf("----\n");
printf("anch: %p, frst: %p, last: %p\n", &anchor->anchor,
anchor->anchor.next, anchor->last);
printf("anch: %p, frst: %p, last: %p\n", (void *)&anchor->anchor,
(void *)anchor->anchor.next, (void *)anchor->last);
while (list) {
printf("curr: %p, next: %p, prev: %p, type: %d\n", list, list->next,
list->prev, (int)list->type);
printf("curr: %p, next: %p, prev: %p, type: %d\n", (void *)list, (void *)list->next,
(void *)list->prev, (int)list->type);
list = list->next;
}
printf("----\n");

View file

@ -413,7 +413,7 @@ ractor_queue_enq(rb_ractor_t *r, struct rb_ractor_queue *rq, struct rb_ractor_ba
rq->size *= 2;
}
rq->baskets[(rq->start + rq->cnt++) % rq->size] = *basket;
// fprintf(stderr, "%s %p->cnt:%d\n", __func__, rq, rq->cnt);
// fprintf(stderr, "%s %p->cnt:%d\n", __func__, (void *)rq, rq->cnt);
}
static void
@ -502,7 +502,7 @@ ractor_wakeup(rb_ractor_t *r, enum ractor_wait_status wait_status, enum ractor_w
{
ASSERT_ractor_locking(r);
// fprintf(stderr, "%s r:%p status:%s/%s wakeup_status:%s/%s\n", __func__, r,
// fprintf(stderr, "%s r:%p status:%s/%s wakeup_status:%s/%s\n", __func__, (void *)r,
// wait_status_str(r->sync.wait.status), wait_status_str(wait_status),
// wakeup_status_str(r->sync.wait.wakeup_status), wakeup_status_str(wakeup_status));
@ -582,7 +582,7 @@ ractor_sleep(rb_execution_context_t *ec, rb_ractor_t *cr)
{
VM_ASSERT(GET_RACTOR() == cr);
VM_ASSERT(cr->sync.wait.status != wait_none);
// fprintf(stderr, "%s r:%p status:%s, wakeup_status:%s\n", __func__, cr,
// fprintf(stderr, "%s r:%p status:%s, wakeup_status:%s\n", __func__, (void *)cr,
// wait_status_str(cr->sync.wait.status), wakeup_status_str(cr->sync.wait.wakeup_status));
RACTOR_UNLOCK(cr);
@ -754,7 +754,8 @@ rq_dump(struct rb_ractor_queue *rq)
bool bug = false;
for (int i=0; i<rq->cnt; i++) {
struct rb_ractor_basket *b = ractor_queue_at(rq, i);
fprintf(stderr, "%d (start:%d) type:%s %p %s\n", i, rq->start, basket_type_name(b->type), b, RSTRING_PTR(RARRAY_AREF(b->v, 1)));
fprintf(stderr, "%d (start:%d) type:%s %p %s\n", i, rq->start, basket_type_name(b->type),
(void *)b, RSTRING_PTR(RARRAY_AREF(b->v, 1)));
if (b->type == basket_type_reserved) bug = true;
}
if (bug) rb_bug("!!");