summaryrefslogtreecommitdiff
path: root/ext/refinement/refinement.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/refinement/refinement.c')
-rw-r--r--ext/refinement/refinement.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/refinement/refinement.c b/ext/refinement/refinement.c
index 43ec2fb8b01..44ffd2a0b83 100644
--- a/ext/refinement/refinement.c
+++ b/ext/refinement/refinement.c
@@ -1,4 +1,11 @@
void ruby_Init_refinement(void);
+#ifdef __GNUC__
+#define PRINTF_ARGS(decl, string_index, first_to_check) \
+ decl __attribute__((format(printf, string_index, first_to_check)))
+#else
+#define PRINTF_ARGS(decl, string_index, first_to_check) decl
+#endif
+PRINTF_ARGS(void rb_warn(const char*, ...), 1, 2);
void
Init_refinement(void)