Skip to content

Commit 35eb12c

Browse files
committed
add casts
%p is for void *. Becuase fprintf is a function with variadic arguments automatic cast from any pointer to void * does not work. We have to be explicit.
1 parent f40143f commit 35eb12c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

compile.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11268,7 +11268,7 @@ ibf_load_object(const struct ibf_load *load, VALUE object_index)
1126811268

1126911269
#if IBF_ISEQ_DEBUG
1127011270
fprintf(stderr, "ibf_load_object: list=%#x offsets=%p offset=%#x\n",
11271-
load->current_buffer->obj_list_offset, offsets, offset);
11271+
load->current_buffer->obj_list_offset, (void *)offsets, offset);
1127211272
fprintf(stderr, "ibf_load_object: type=%#x special=%d frozen=%d internal=%d\n",
1127311273
header.type, header.special_const, header.frozen, header.internal);
1127411274
#endif
@@ -11458,7 +11458,7 @@ ibf_load_iseq(const struct ibf_load *load, const rb_iseq_t *index_iseq)
1145811458

1145911459
#if IBF_ISEQ_DEBUG
1146011460
fprintf(stderr, "ibf_load_iseq: index_iseq=%p iseq_list=%p\n",
11461-
index_iseq, (void *)load->iseq_list);
11461+
(void *)index_iseq, (void *)load->iseq_list);
1146211462
#endif
1146311463
if (iseq_index == -1) {
1146411464
return NULL;
@@ -11475,27 +11475,27 @@ ibf_load_iseq(const struct ibf_load *load, const rb_iseq_t *index_iseq)
1147511475
else {
1147611476
rb_iseq_t *iseq = iseq_imemo_alloc();
1147711477
#if IBF_ISEQ_DEBUG
11478-
fprintf(stderr, "ibf_load_iseq: new iseq=%p\n", iseq);
11478+
fprintf(stderr, "ibf_load_iseq: new iseq=%p\n", (void *)iseq);
1147911479
#endif
1148011480
FL_SET(iseq, ISEQ_NOT_LOADED_YET);
1148111481
iseq->aux.loader.obj = load->loader_obj;
1148211482
iseq->aux.loader.index = iseq_index;
1148311483
#if IBF_ISEQ_DEBUG
1148411484
fprintf(stderr, "ibf_load_iseq: iseq=%p loader_obj=%p index=%d\n",
11485-
iseq, (void *)load->loader_obj, iseq_index);
11485+
(void *)iseq, (void *)load->loader_obj, iseq_index);
1148611486
#endif
1148711487
rb_ary_store(load->iseq_list, iseq_index, (VALUE)iseq);
1148811488

1148911489
#if !USE_LAZY_LOAD
1149011490
#if IBF_ISEQ_DEBUG
11491-
fprintf(stderr, "ibf_load_iseq: loading iseq=%p\n", iseq);
11491+
fprintf(stderr, "ibf_load_iseq: loading iseq=%p\n", (void *)iseq);
1149211492
#endif
1149311493
rb_ibf_load_iseq_complete(iseq);
1149411494
#endif /* !USE_LAZY_LOAD */
1149511495

1149611496
#if IBF_ISEQ_DEBUG
1149711497
fprintf(stderr, "ibf_load_iseq: iseq=%p loaded %p\n",
11498-
iseq, load->iseq);
11498+
(void *)iseq, (void *)load->iseq);
1149911499
#endif
1150011500
return iseq;
1150111501
}

0 commit comments

Comments
 (0)