diff options
author | Kazuhiro NISHIYAMA <[email protected]> | 2021-09-28 18:00:03 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2021-10-20 07:48:30 +0900 |
commit | 9b18f1bffe056f9f3e0c37b7c847ecb3ca942307 (patch) | |
tree | 00bbd2e4c54894fb78a9dfac354d42741c7cc297 /vm_debug.h | |
parent | 79f9f8326a34e499bb2d84d8282943188b1131bd (diff) |
Supress `warning: data argument not used by format string [-Wformat-extra-args]`
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4903
Diffstat (limited to 'vm_debug.h')
-rw-r--r-- | vm_debug.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/vm_debug.h b/vm_debug.h index 2840e70646..8f7027224d 100644 --- a/vm_debug.h +++ b/vm_debug.h @@ -94,24 +94,24 @@ bool ruby_debug_log_filter(const char *func_name); // convenient macro to log even if the USE_RUBY_DEBUG_LOG macro is not specified. // You can use this macro for temporary usage (you should not commit it). -#define _RUBY_DEBUG_LOG(fmt, ...) ruby_debug_log(__FILE__, __LINE__, __func__, fmt, __VA_ARGS__) +#define _RUBY_DEBUG_LOG(...) ruby_debug_log(__FILE__, __LINE__, __func__, __VA_ARGS__) #if USE_RUBY_DEBUG_LOG -#define RUBY_DEBUG_LOG(fmt, ...) do { \ +#define RUBY_DEBUG_LOG(...) do { \ if (ruby_debug_log_mode && ruby_debug_log_filter(__func__)) \ - ruby_debug_log(__FILE__, __LINE__, __func__, fmt, __VA_ARGS__); \ + ruby_debug_log(__FILE__, __LINE__, __func__, __VA_ARGS__); \ } while (0) -#define RUBY_DEBUG_LOG2(file, line, fmt, ...) do { \ +#define RUBY_DEBUG_LOG2(file, line, ...) do { \ if (ruby_debug_log_mode && ruby_debug_log_filter(__func__)) \ - ruby_debug_log(file, line, __func__, fmt, __VA_ARGS__); \ + ruby_debug_log(file, line, __func__, __VA_ARGS__); \ } while (0) #else // do nothing -#define RUBY_DEBUG_LOG(fmt, ...) -#define RUBY_DEBUG_LOG2(file, line, fmt, ...) +#define RUBY_DEBUG_LOG(...) +#define RUBY_DEBUG_LOG2(file, line, ...) #endif // USE_RUBY_DEBUG_LOG #endif /* RUBY_DEBUG_H */ |