diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2021-09-09 14:05:11 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2021-09-10 20:00:06 +0900 |
commit | dddc618d3076de2c1b27d01f106bf0bf126d4677 (patch) | |
tree | 57b13edb169ca85ce5eac81dee47147bbbefc35c /error.c | |
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 'error.c')
-rw-r--r-- | error.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -108,6 +108,7 @@ err_position_0(char *buf, long len, const char *file, int line) } } +RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 5, 0) static VALUE err_vcatf(VALUE str, const char *pre, const char *file, int line, const char *fmt, va_list args) @@ -344,6 +345,7 @@ rb_write_warning_str(VALUE str) rb_warning_warn(rb_mWarning, str); } +RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 4, 0) static VALUE warn_vsprintf(rb_encoding *enc, const char *file, int line, const char *fmt, va_list args) { @@ -396,6 +398,7 @@ rb_category_compile_warn(rb_warning_category_t category, const char *file, int l rb_warn_category(str, rb_warning_category_to_name(category)); } +RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 0) static VALUE warning_string(rb_encoding *enc, const char *fmt, va_list args) { @@ -716,6 +719,7 @@ postscript_dump(FILE *out) bug_important_message(out, msg, msglen); } +RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 0) static void bug_report_begin_valist(FILE *out, const char *fmt, va_list args) { @@ -779,6 +783,7 @@ die(void) abort(); } +RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 1, 0) void rb_bug_without_die(const char *fmt, va_list args) { |