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

ruby-changes:56836

From: Nobuyoshi <ko1@a...>
Date: Tue, 6 Aug 2019 12:06:20 +0900 (JST)
Subject: [ruby-changes:56836] Nobuyoshi Nakada: 4daff3a603 (master): The value of rb_scan_args_verify is never used

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

From 4daff3a603d1a8b2656e82108e2f7d0abf8103c9 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Tue, 6 Aug 2019 11:56:37 +0900
Subject: The value of rb_scan_args_verify is never used


diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 89e49e1..d9a72d4 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -2324,11 +2324,11 @@ int ruby_vsnprintf(char *str, size_t n, char const *fmt, va_list ap); https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L2324
 		      ((VALUE*[]){__VA_ARGS__})), \
         rb_scan_args(argc,argvp,fmt,##__VA_ARGS__))
 # if HAVE_ATTRIBUTE_ERRORFUNC
-ERRORFUNC(("bad scan arg format"), int rb_scan_args_bad_format(const char*));
-ERRORFUNC(("variable argument length doesn't match"), int rb_scan_args_length_mismatch(const char*,int));
+ERRORFUNC(("bad scan arg format"), void rb_scan_args_bad_format(const char*));
+ERRORFUNC(("variable argument length doesn't match"), void rb_scan_args_length_mismatch(const char*,int));
 # else
-#   define rb_scan_args_bad_format(fmt) 0
-#   define rb_scan_args_length_mismatch(fmt, varc) 0
+#   define rb_scan_args_bad_format(fmt) ((void)0)
+#   define rb_scan_args_length_mismatch(fmt, varc) ((void)0)
 # endif
 
 # define rb_scan_args_isdigit(c) ((unsigned char)((c)-'0')<10)
@@ -2378,7 +2378,7 @@ ERRORFUNC(("variable argument length doesn't match"), int rb_scan_args_length_mi https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L2378
      rb_scan_args_bad_format(fmt) : \
      sizeof(char[1-2*(rb_scan_args_count(fmt)!=(varc))])!=1 ? \
      rb_scan_args_length_mismatch(fmt, varc) : \
-     (int)(varc))
+     (void)0)
 # endif
 
 ALWAYS_INLINE(static int rb_scan_args_lead_p(const char *fmt));
-- 
cgit v0.10.2


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

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