summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sprintf.c4
-rw-r--r--vm_trace.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/sprintf.c b/sprintf.c
index 52771eb52a..4ee7e1d4f0 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -1247,6 +1247,10 @@ fmt_setup(char *buf, size_t size, int c, int flags, int width, int prec)
#endif
#define lower_hexdigits (ruby_hexdigits+0)
#define upper_hexdigits (ruby_hexdigits+16)
+#if defined RUBY_USE_SETJMPEX && RUBY_USE_SETJMPEX
+# undef MAYBE_UNUSED
+# define MAYBE_UNUSED(x) x = 0
+#endif
#include "vsnprintf.c"
static char *
diff --git a/vm_trace.c b/vm_trace.c
index 7b8c76b3b4..284950e08d 100644
--- a/vm_trace.c
+++ b/vm_trace.c
@@ -402,6 +402,9 @@ rb_suppress_tracing(VALUE (*func)(VALUE), VALUE arg)
if (!tracing) th->vm->trace_running--;
if (state) {
+#if defined RUBY_USE_SETJMPEX && RUBY_USE_SETJMPEX
+ RB_GC_GUARD(result);
+#endif
TH_JUMP_TAG(th, state);
}