From a5e33a9b669785f0d0dbf9969b0d57880531b97b Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 14 May 2019 17:22:28 +0200 Subject: [PATCH] BUILD: debug: make gcc not complain on the ABORT_NOW() macro On recent gcc versions with the null-deref checks, ABORT_NOW() rightfully emits such a warning. But here it's on purpose. Simply changing the memory address to 1 makes gcc happy. --- include/common/debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/common/debug.h b/include/common/debug.h index 325ef8396..8f6d12342 100644 --- a/include/common/debug.h +++ b/include/common/debug.h @@ -40,7 +40,7 @@ /* This abort is more efficient than abort() because it does not mangle the * stack and stops at the exact location we need. */ -#define ABORT_NOW() (*(volatile int*)0=0) +#define ABORT_NOW() (*(volatile int*)1=0) /* this one is provided for easy code tracing. * Usage: TRACE(strm||0, fmt, args...);