mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
5ffd3ca1c3
commit
19faee195a
2 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Fri Jun 14 12:21:20 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* 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@ruby-lang.org>
|
Fri Jun 14 09:48:48 2013 Shugo Maeda <shugo@ruby-lang.org>
|
||||||
|
|
||||||
* NEWS: add notes for $SAFE.
|
* NEWS: add notes for $SAFE.
|
||||||
|
|
|
@ -566,9 +566,9 @@ int ruby$safe_level$4(void) __attribute__((error("$SAFE=4 is obsolete")));
|
||||||
__extension__(__builtin_constant_p(level) && \
|
__extension__(__builtin_constant_p(level) && \
|
||||||
((level) < 0 || RUBY_SAFE_LEVEL_MAX < (level)))
|
((level) < 0 || RUBY_SAFE_LEVEL_MAX < (level)))
|
||||||
#define RUBY_SAFE_LEVEL_CHECK(level) \
|
#define RUBY_SAFE_LEVEL_CHECK(level) \
|
||||||
(RUBY_SAFE_LEVEL_INVALID_P(level) ? ruby$safe_level$4() : 0)
|
(RUBY_SAFE_LEVEL_INVALID_P(level) ? ruby$safe_level$4() : (level))
|
||||||
#define rb_secure(level) (RUBY_SAFE_LEVEL_CHECK(level), rb_secure(level))
|
#define rb_secure(level) rb_secure(RUBY_SAFE_LEVEL_CHECK(level))
|
||||||
#define rb_set_safe_level(level) (RUBY_SAFE_LEVEL_CHECK(level), rb_set_safe_level(level))
|
#define rb_set_safe_level(level) rb_set_safe_level(RUBY_SAFE_LEVEL_CHECK(level))
|
||||||
#endif
|
#endif
|
||||||
void rb_set_safe_level_force(int);
|
void rb_set_safe_level_force(int);
|
||||||
void rb_secure_update(VALUE);
|
void rb_secure_update(VALUE);
|
||||||
|
|
Loading…
Reference in a new issue