mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
ruby.h: suppress false warnings
* include/ruby/ruby.h (rb_data_object_alloc_warning): enable only if __builtin_choose_expr works with __builtin_constant_p so that warnings will be suppressed if klass is 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5d09df3273
commit
c7988fd29d
2 changed files with 2 additions and 2 deletions
|
@ -1169,7 +1169,9 @@ rb_obj_freeze_inline(VALUE x)
|
|||
# define RUBY_UNTYPED_DATA_FUNC(func) DEPRECATED(func)
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P)
|
||||
RUBY_UNTYPED_DATA_FUNC(static inline VALUE rb_data_object_alloc_warning(VALUE,void*,RUBY_DATA_FUNC,RUBY_DATA_FUNC));
|
||||
#endif
|
||||
RUBY_UNTYPED_DATA_FUNC(static inline void *rb_data_object_get_warning(VALUE));
|
||||
|
||||
static inline VALUE
|
||||
|
|
2
random.c
2
random.c
|
@ -491,8 +491,6 @@ fill_random_bytes(void *seed, size_t size)
|
|||
}
|
||||
else {
|
||||
if (!old_prov) {
|
||||
# undef RUBY_UNTYPED_DATA_WARNING
|
||||
# define RUBY_UNTYPED_DATA_WARNING 0
|
||||
rb_gc_register_mark_object(Data_Wrap_Struct(0, 0, release_crypt, &prov));
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Reference in a new issue