[前][次][番号順一覧][スレッド一覧]

ruby-changes:28914

From: nobu <ko1@a...>
Date: Tue, 28 May 2013 01:48:55 +0900 (JST)
Subject: [ruby-changes:28914] nobu:r40965 (trunk): suppress warnings

nobu	2013-05-28 01:48:15 +0900 (Tue, 28 May 2013)

  New Revision: 40965

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40965

  Log:
    suppress warnings
    
    * ext/-test-/postponed_job/postponed_job.c (pjob_register),
      (pjob_call_direct): none void function.
    
    * ext/-test-/tracepoint/tracepoint.c (tracepoint_track_objspace_events):
      adjust type to get rid of implicit cast.
    
    * ext/objspace/object_tracing.c (newobj_i): ditto.
    
    * ext/tk/tkutil/tkutil.c (tk_conv_args): adjust type against
      RHASH_SIZE().

  Modified files:
    trunk/ext/-test-/postponed_job/postponed_job.c
    trunk/ext/-test-/tracepoint/tracepoint.c
    trunk/ext/objspace/object_tracing.c
    trunk/ext/tk/tkutil/tkutil.c

Index: ext/objspace/object_tracing.c
===================================================================
--- ext/objspace/object_tracing.c	(revision 40964)
+++ ext/objspace/object_tracing.c	(revision 40965)
@@ -42,7 +42,7 @@ newobj_i(VALUE tpval, void *data) https://github.com/ruby/ruby/blob/trunk/ext/objspace/object_tracing.c#L42
     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;
Index: ext/-test-/postponed_job/postponed_job.c
===================================================================
--- ext/-test-/postponed_job/postponed_job.c	(revision 40964)
+++ ext/-test-/postponed_job/postponed_job.c	(revision 40965)
@@ -14,12 +14,14 @@ static VALUE https://github.com/ruby/ruby/blob/trunk/ext/-test-/postponed_job/postponed_job.c#L14
 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
Index: ext/-test-/tracepoint/tracepoint.c
===================================================================
--- ext/-test-/tracepoint/tracepoint.c	(revision 40964)
+++ ext/-test-/tracepoint/tracepoint.c	(revision 40965)
@@ -47,7 +47,7 @@ tracepoint_track_objspace_events(VALUE s https://github.com/ruby/ruby/blob/trunk/ext/-test-/tracepoint/tracepoint.c#L47
 				    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;
 
Index: ext/tk/tkutil/tkutil.c
===================================================================
--- ext/tk/tkutil/tkutil.c	(revision 40964)
+++ ext/tk/tkutil/tkutil.c	(revision 40965)
@@ -936,7 +936,8 @@ tk_conv_args(argc, argv, self) https://github.com/ruby/ruby/blob/trunk/ext/tk/tkutil/tkutil.c#L936
     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;

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]