Skip to content

Commit 5a31a59

Browse files
committed
Avoid -Wgnu-zero-variadic-macro-arguments warning
* .../languages/ruby/lib/cext/include/truffleruby/truffleruby.h:48:59: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments] rb_exc_raise(rb_exc_new_str(EXCEPTION, rb_sprintf(FORMAT, ##__VA_ARGS__))) ^
1 parent 3689787 commit 5a31a59

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/cext/include/truffleruby/truffleruby.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ typedef void* (gvl_call)(void *);
4444

4545
// Exceptions
4646

47-
#define rb_raise(EXCEPTION, FORMAT, ...) \
48-
rb_exc_raise(rb_exc_new_str(EXCEPTION, rb_sprintf(FORMAT, ##__VA_ARGS__)))
47+
#define rb_raise(EXCEPTION, ...) \
48+
rb_exc_raise(rb_exc_new_str(EXCEPTION, rb_sprintf(__VA_ARGS__)))
4949

5050
// Macros for rb_funcall(). As written they currently only work on Sulong.
5151
//

0 commit comments

Comments
 (0)