From 19faee195a7f5a9cc5e24b64cc655f79c10ac872 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 14 Jun 2013 03:21:23 +0000 Subject: [PATCH] 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ include/ruby/ruby.h | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index d5dbd8bd00..0d195a5a6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Jun 14 12:21:20 2013 Nobuyoshi Nakada + + * 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 * NEWS: add notes for $SAFE. diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index 4ec4e7f192..1891915962 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -566,9 +566,9 @@ int ruby$safe_level$4(void) __attribute__((error("$SAFE=4 is obsolete"))); __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);