From: Willy Tarreau Date: Tue, 14 May 2019 15:22:28 +0000 (+0200) Subject: BUILD: debug: make gcc not complain on the ABORT_NOW() macro X-Git-Tag: v2.0-dev3~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5e33a9b669785f0d0dbf9969b0d57880531b97b;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/include/common/debug.h b/include/common/debug.h index 325ef8396b..8f6d123425 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...);