From 54ad2bd6d09b8a04baef60dde2998bd40e73db36 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 22 Jun 2020 06:17:12 +0900 Subject: Use canary cond also if not VM_CHECK_MODE to suppress warnings --- vm_insnhelper.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vm_insnhelper.h') diff --git a/vm_insnhelper.h b/vm_insnhelper.h index 702c3b7fc3..936778f7f0 100644 --- a/vm_insnhelper.h +++ b/vm_insnhelper.h @@ -158,8 +158,8 @@ CC_SET_FASTPATH(const struct rb_callcache *cc, vm_call_handler func, bool enable } \ } #else -#define SETUP_CANARY(cond) /* void */ -#define CHECK_CANARY(cond, insn) /* void */ +#define SETUP_CANARY(cond) if (cond) {} else {} +#define CHECK_CANARY(cond, insn) if (cond) {(void)(insn);} #endif /**********************************************************/ -- cgit v1.2.1