diff options
author | 卜部昌平 <[email protected]> | 2021-09-09 14:05:11 +0900 |
---|---|---|
committer | 卜部昌平 <[email protected]> | 2021-09-10 20:00:06 +0900 |
commit | dddc618d3076de2c1b27d01f106bf0bf126d4677 (patch) | |
tree | 57b13edb169ca85ce5eac81dee47147bbbefc35c /internal/error.h | |
parent | fd12bc1896bd4a78b9ff376fd685a009254b153f (diff) |
suppress GCC's -Wsuggest-attribute=format
I was not aware of this because I use clang these days.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4815
Diffstat (limited to 'internal/error.h')
-rw-r--r-- | internal/error.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/error.h b/internal/error.h index 9bf3ba3fa3..11601858f4 100644 --- a/internal/error.h +++ b/internal/error.h @@ -43,6 +43,7 @@ extern long rb_backtrace_length_limit; extern VALUE rb_eEAGAIN; extern VALUE rb_eEWOULDBLOCK; extern VALUE rb_eEINPROGRESS; +RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 3, 0) void rb_report_bug_valist(VALUE file, int line, const char *fmt, va_list args); NORETURN(void rb_async_bug_errno(const char *,int)); const char *rb_builtin_type_name(int t); @@ -114,6 +115,7 @@ void rb_deprecated_method_to_be_removed(const char *); # define RBIMPL_TODO0(x) #endif #define RBIMPL_TODO(message) RBIMPL_TODO0("TODO: " message) +RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 6, 0) VALUE rb_syntax_error_append(VALUE, VALUE, int, int, rb_encoding*, const char*, va_list); PRINTF_ARGS(void rb_enc_warn(rb_encoding *enc, const char *fmt, ...), 2, 3); PRINTF_ARGS(void rb_sys_enc_warning(rb_encoding *enc, const char *fmt, ...), 2, 3); @@ -124,6 +126,7 @@ VALUE rb_name_err_new(VALUE mesg, VALUE recv, VALUE method); VALUE rb_nomethod_err_new(VALUE mesg, VALUE recv, VALUE method, VALUE args, int priv); VALUE rb_key_err_new(VALUE mesg, VALUE recv, VALUE name); PRINTF_ARGS(VALUE rb_warning_string(const char *fmt, ...), 1, 2); +RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 0) NORETURN(void rb_vraise(VALUE, const char *, va_list)); NORETURN(static inline void rb_raise_cstr(VALUE etype, const char *mesg)); NORETURN(static inline void rb_raise_cstr_i(VALUE etype, VALUE mesg)); |