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

ruby-changes:40876

From: nobu <ko1@a...>
Date: Tue, 8 Dec 2015 23:12:19 +0900 (JST)
Subject: [ruby-changes:40876] nobu:r52955 (trunk): suppress warnings

nobu	2015-12-08 23:12:11 +0900 (Tue, 08 Dec 2015)

  New Revision: 52955

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

  Log:
    suppress warnings
    
    * compile.c (iseq_ibf_dump): check lenght overflow.
    
    * vm_core.h (rb_iseq_check): suppress unused-value warnings.

  Modified files:
    trunk/compile.c
    trunk/vm_core.h
Index: vm_core.h
===================================================================
--- vm_core.h	(revision 52954)
+++ vm_core.h	(revision 52955)
@@ -410,18 +410,18 @@ struct rb_iseq_struct { https://github.com/ruby/ruby/blob/trunk/vm_core.h#L410
 
 #if USE_LAZY_LOAD
 const rb_iseq_t *rb_iseq_complete(const rb_iseq_t *iseq);
+#endif
 
 static inline const rb_iseq_t *
 rb_iseq_check(const rb_iseq_t *iseq)
 {
+#if USE_LAZY_LOAD
     if (iseq->body == NULL) {
 	rb_iseq_complete((rb_iseq_t *)iseq);
     }
+#endif
     return iseq;
 }
-#else
-#define rb_iseq_check(iseq) iseq
-#endif
 
 enum ruby_special_exceptions {
     ruby_error_reenter,
Index: compile.c
===================================================================
--- compile.c	(revision 52954)
+++ compile.c	(revision 52955)
@@ -8062,7 +8062,7 @@ iseq_ibf_dump(const rb_iseq_t *iseq, VAL https://github.com/ruby/ruby/blob/trunk/compile.c#L8062
 
     if (RTEST(opt)) {
 	VALUE opt_str = rb_check_string_type(opt);
-	header.extra_size = (unsigned int)RSTRING_LEN(opt_str) + 1;
+	header.extra_size = RSTRING_LENINT(opt_str) + 1;
 	ibf_dump_write(&dump, RSTRING_PTR(opt_str), header.extra_size);
     }
     else {

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

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