summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/-test-/postponed_job/postponed_job.c2
-rw-r--r--ext/-test-/tracepoint/tracepoint.c2
-rw-r--r--ext/objspace/object_tracing.c2
-rw-r--r--ext/tk/tkutil/tkutil.c3
4 files changed, 6 insertions, 3 deletions
diff --git a/ext/-test-/postponed_job/postponed_job.c b/ext/-test-/postponed_job/postponed_job.c
index d9938a5c68..ac1bf80890 100644
--- a/ext/-test-/postponed_job/postponed_job.c
+++ b/ext/-test-/postponed_job/postponed_job.c
@@ -14,12 +14,14 @@ static VALUE
pjob_register(VALUE self, VALUE obj)
{
rb_postponed_job_register(0, pjob_callback, (void *)obj);
+ return self;
}
static VALUE
pjob_call_direct(VALUE self, VALUE obj)
{
pjob_callback((void *)obj);
+ return self;
}
void
diff --git a/ext/-test-/tracepoint/tracepoint.c b/ext/-test-/tracepoint/tracepoint.c
index 2710f51747..676224873f 100644
--- a/ext/-test-/tracepoint/tracepoint.c
+++ b/ext/-test-/tracepoint/tracepoint.c
@@ -47,7 +47,7 @@ tracepoint_track_objspace_events(VALUE self)
RUBY_INTERNAL_EVENT_GC_START | RUBY_INTERNAL_EVENT_GC_END,
tracepoint_track_objspace_events_i, 0);
VALUE result = rb_ary_new();
- int i;
+ size_t i;
newobj_count = free_count = gc_start_count = objects_count = 0;
diff --git a/ext/objspace/object_tracing.c b/ext/objspace/object_tracing.c
index 3caaa75065..5950cb7a78 100644
--- a/ext/objspace/object_tracing.c
+++ b/ext/objspace/object_tracing.c
@@ -42,7 +42,7 @@ newobj_i(VALUE tpval, void *data)
VALUE obj = rb_tracearg_object(tparg);
VALUE path = rb_tracearg_path(tparg);
VALUE line = rb_tracearg_lineno(tparg);
- int path_len = RSTRING_LEN(path);
+ long path_len = RSTRING_LEN(path);
struct allocation_info *info = (struct allocation_info *)ruby_xmalloc(sizeof(struct allocation_info));
char *path_cstr = ruby_xmalloc(path_len + 1);
char *path_stored_cstr;
diff --git a/ext/tk/tkutil/tkutil.c b/ext/tk/tkutil/tkutil.c
index 88f1291006..318b2732d0 100644
--- a/ext/tk/tkutil/tkutil.c
+++ b/ext/tk/tkutil/tkutil.c
@@ -936,7 +936,8 @@ tk_conv_args(argc, argv, self)
VALUE *argv; /* [0]:base_array, [1]:enc_mode, [2]..[n]:args */
VALUE self;
{
- int idx, size;
+ int idx;
+ long size;
volatile VALUE dst;
int thr_crit_bup;
VALUE old_gc;