[前][次][番号順一覧][スレッド一覧]

ruby-changes:67955

From: Nobuyoshi <ko1@a...>
Date: Sun, 12 Sep 2021 18:05:38 +0900 (JST)
Subject: [ruby-changes:67955] e802587433 (master): Add printf attribute to functions call va_list format functions

https://git.ruby-lang.org/ruby.git/commit/?id=e802587433

From e8025874334fa583fc77ed2ccc32ee78c2519a2c Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sun, 12 Sep 2021 14:05:52 +0900
Subject: Add printf attribute to functions call va_list format functions

---
 spec/ruby/optional/capi/ext/string_spec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/spec/ruby/optional/capi/ext/string_spec.c b/spec/ruby/optional/capi/ext/string_spec.c
index 991aa88..c3fa53c 100644
--- a/spec/ruby/optional/capi/ext/string_spec.c
+++ b/spec/ruby/optional/capi/ext/string_spec.c
@@ -471,6 +471,7 @@ static VALUE string_spec_rb_sprintf4(VALUE self, VALUE str) { https://github.com/ruby/ruby/blob/trunk/spec/ruby/optional/capi/ext/string_spec.c#L471
   return rb_sprintf("Result: %+" PRIsVALUE ".", str);
 }
 
+PRINTF_ARGS(static VALUE string_spec_rb_vsprintf_worker(char* fmt, ...), 1, 2);
 static VALUE string_spec_rb_vsprintf_worker(char* fmt, ...) {
   va_list varargs;
   VALUE str;
@@ -533,6 +534,7 @@ static VALUE string_spec_rb_utf8_str_new_cstr(VALUE self) { https://github.com/ruby/ruby/blob/trunk/spec/ruby/optional/capi/ext/string_spec.c#L534
   return rb_utf8_str_new_cstr("nokogiri");
 }
 
+PRINTF_ARGS(static VALUE call_rb_str_vcatf(VALUE mesg, const char *fmt, ...), 2, 3);
 static VALUE call_rb_str_vcatf(VALUE mesg, const char *fmt, ...){
   va_list ap;
   va_start(ap, fmt);
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]