From: Arran Cudbard-Bell Date: Tue, 10 Apr 2018 05:50:17 +0000 (+0600) Subject: Set WITH_VERIFY_PTR during clang scan so that NULL code paths result in exit X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cdcbdc5fa57ccbccf77fb4aba4df5f81e696892b;p=thirdparty%2Ffreeradius-server.git Set WITH_VERIFY_PTR during clang scan so that NULL code paths result in exit --- diff --git a/src/include/build.h b/src/include/build.h index 105f59ee7fd..f204818d1d7 100644 --- a/src/include/build.h +++ b/src/include/build.h @@ -27,6 +27,16 @@ #ifdef __cplusplus extern "C" { #endif + +/* + * Reduce spurious errors from clang scan by having + * all paths that find the da to be NULL, result + * in program exit. + */ +#ifdef __clang_analyzer__ +# define WITH_VERIFY_PTR 1 +#endif + /* * The ubiquitous stringify macros */