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; char *strtab = file + cmd->stroff, *sname = 0;
uint32_t j; uint32_t j;
uintptr_t saddr = 0; 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++) { for (j = 0; j < cmd->nsyms; j++) {
uintptr_t symsize, d; uintptr_t symsize, d;
struct LP(nlist) *e = &nl[j]; 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); LINK_ELEMENT *list = FIRST_ELEMENT(anchor);
printf("----\n"); printf("----\n");
printf("anch: %p, frst: %p, last: %p\n", &anchor->anchor, printf("anch: %p, frst: %p, last: %p\n", (void *)&anchor->anchor,
anchor->anchor.next, anchor->last); (void *)anchor->anchor.next, (void *)anchor->last);
while (list) { while (list) {
printf("curr: %p, next: %p, prev: %p, type: %d\n", list, list->next, printf("curr: %p, next: %p, prev: %p, type: %d\n", (void *)list, (void *)list->next,
list->prev, (int)list->type); (void *)list->prev, (int)list->type);
list = list->next; list = list->next;
} }
printf("----\n"); 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->size *= 2;
} }
rq->baskets[(rq->start + rq->cnt++) % rq->size] = *basket; 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 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); 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), // 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)); // 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(GET_RACTOR() == cr);
VM_ASSERT(cr->sync.wait.status != wait_none); 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)); // wait_status_str(cr->sync.wait.status), wakeup_status_str(cr->sync.wait.wakeup_status));
RACTOR_UNLOCK(cr); RACTOR_UNLOCK(cr);
@ -754,7 +754,8 @@ rq_dump(struct rb_ractor_queue *rq)
bool bug = false; bool bug = false;
for (int i=0; i<rq->cnt; i++) { for (int i=0; i<rq->cnt; i++) {
struct rb_ractor_basket *b = ractor_queue_at(rq, 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 (b->type == basket_type_reserved) bug = true;
} }
if (bug) rb_bug("!!"); if (bug) rb_bug("!!");