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

ruby-changes:29240

From: nobu <ko1@a...>
Date: Fri, 14 Jun 2013 12:21:34 +0900 (JST)
Subject: [ruby-changes:29240] nobu:r41292 (trunk): ruby.h: suppress warnings

nobu	2013-06-14 12:21:23 +0900 (Fri, 14 Jun 2013)

  New Revision: 41292

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

  Log:
    ruby.h: suppress warnings
    
    * include/ruby/ruby.h (RUBY_SAFE_LEVEL_CHECK): suppress warnings
      "left-hand operand of comma expression has no effect", on gcc 4.4.

  Modified files:
    trunk/ChangeLog
    trunk/include/ruby/ruby.h

Index: include/ruby/ruby.h
===================================================================
--- include/ruby/ruby.h	(revision 41291)
+++ include/ruby/ruby.h	(revision 41292)
@@ -566,9 +566,9 @@ int ruby$safe_level$4(void) __attribute_ https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L566
     __extension__(__builtin_constant_p(level) && \
 		  ((level) < 0 || RUBY_SAFE_LEVEL_MAX < (level)))
 #define RUBY_SAFE_LEVEL_CHECK(level) \
-    (RUBY_SAFE_LEVEL_INVALID_P(level) ? ruby$safe_level$4() : 0)
-#define rb_secure(level) (RUBY_SAFE_LEVEL_CHECK(level), rb_secure(level))
-#define rb_set_safe_level(level) (RUBY_SAFE_LEVEL_CHECK(level), rb_set_safe_level(level))
+    (RUBY_SAFE_LEVEL_INVALID_P(level) ? ruby$safe_level$4() : (level))
+#define rb_secure(level) rb_secure(RUBY_SAFE_LEVEL_CHECK(level))
+#define rb_set_safe_level(level) rb_set_safe_level(RUBY_SAFE_LEVEL_CHECK(level))
 #endif
 void rb_set_safe_level_force(int);
 void rb_secure_update(VALUE);
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 41291)
+++ ChangeLog	(revision 41292)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Jun 14 12:21:20 2013  Nobuyoshi Nakada  <nobu@r...>
+
+	* include/ruby/ruby.h (RUBY_SAFE_LEVEL_CHECK): suppress warnings
+	  "left-hand operand of comma expression has no effect", on gcc 4.4.
+
 Fri Jun 14 09:48:48 2013  Shugo Maeda  <shugo@r...>
 
 	* NEWS: add notes for $SAFE.

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

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