From b9cc4072e640244d07f4202cc63a1620487118a6 Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Sat, 25 May 2019 18:54:59 -0400 Subject: [PATCH] src: make UNREACHABLE variadic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Eliminate warning C4003 - not enough arguments for function-like macro invocation 'UNREACHABLE' PR-URL: https://github.com/nodejs/node/pull/27877 Reviewed-By: Tobias Nießen Reviewed-By: Daniel Bevenius --- src/util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util.h b/src/util.h index 5f02ffd2a3653e..b7a2d28b669aaa 100644 --- a/src/util.h +++ b/src/util.h @@ -181,8 +181,8 @@ void DumpBacktrace(FILE* fp); #endif -#define UNREACHABLE(expr) \ - ERROR_AND_ABORT("Unreachable code reached: " expr) +#define UNREACHABLE(...) \ + ERROR_AND_ABORT("Unreachable code reached" __VA_OPT__(": ") __VA_ARGS__) // TAILQ-style intrusive list node. template