From 027b576b31cd12bad575b3a39476726273f58c41 Mon Sep 17 00:00:00 2001 From: naruse Date: Mon, 18 Dec 2017 09:03:59 +0000 Subject: [PATCH] suppress warning: 'const' attribute on function returning 'void' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/intern.h | 4 ++-- include/ruby/ruby.h | 2 +- internal.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/ruby/intern.h b/include/ruby/intern.h index 5684b3230a..a711b86115 100644 --- a/include/ruby/intern.h +++ b/include/ruby/intern.h @@ -249,9 +249,9 @@ PRINTF_ARGS(NORETURN(void rb_name_error_str(VALUE, const char*, ...)), 2, 3); NORETURN(void rb_invalid_str(const char*, const char*)); NORETURN(void rb_error_frozen(const char*)); NORETURN(void rb_error_frozen_object(VALUE)); -CONSTFUNC(void rb_error_untrusted(VALUE)); +void rb_error_untrusted(VALUE); void rb_check_frozen(VALUE); -CONSTFUNC(void rb_check_trusted(VALUE)); +void rb_check_trusted(VALUE); #define rb_check_frozen_internal(obj) do { \ VALUE frozen_obj = (obj); \ if (OBJ_FROZEN(frozen_obj)) { \ diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index 9c7d2fb684..3210103c64 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -628,7 +628,7 @@ int ruby_safe_level_2_warning(void) __attribute__((const,warning("$SAFE=2 to 4 a # define rb_set_safe_level(level) rb_set_safe_level(RUBY_SAFE_LEVEL_CHECK(level, error)) #endif void rb_set_safe_level_force(int); -CONSTFUNC(void rb_secure_update(VALUE)); +void rb_secure_update(VALUE); NORETURN(void rb_insecure_operation(void)); VALUE rb_errinfo(void); diff --git a/internal.h b/internal.h index d0257a8d8b..4ccf3218c6 100644 --- a/internal.h +++ b/internal.h @@ -1110,7 +1110,7 @@ VALUE rb_invcmp(VALUE, VALUE); struct rb_block; int rb_dvar_defined(ID, const struct rb_block *); int rb_local_defined(ID, const struct rb_block *); -CONSTFUNC(const char * rb_insns_name(int i)); +const char * rb_insns_name(int i); VALUE rb_insns_name_array(void); /* complex.c */ @@ -1136,7 +1136,7 @@ void Init_ext(void); /* encoding.c */ ID rb_id_encoding(void); -CONSTFUNC(void rb_gc_mark_encodings(void)); +void rb_gc_mark_encodings(void); rb_encoding *rb_enc_get_from_index(int index); rb_encoding *rb_enc_check_str(VALUE str1, VALUE str2); int rb_encdb_replicate(const char *alias, const char *orig);