From: Mark Andrews Date: Tue, 20 Feb 2018 01:53:27 +0000 (+1100) Subject: redefine CHECK so cppcheck see the definition X-Git-Tag: v9.11.4rc1~104^2~6 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=77819f7d75117336984fb2e1a77774f45de5937e;p=thirdparty%2Fbind9.git redefine CHECK so cppcheck see the definition (cherry picked from commit a4186b18672e6698d42aec3a5dd68a3b289c55ec) --- diff --git a/lib/dns/rdata/in_1/wks_11.c b/lib/dns/rdata/in_1/wks_11.c index d94395f9d77..5050534c6a8 100644 --- a/lib/dns/rdata/in_1/wks_11.c +++ b/lib/dns/rdata/in_1/wks_11.c @@ -6,8 +6,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -/* $Id$ */ - /* Reviewed: Fri Mar 17 15:01:49 PST 2000 by explorer */ #ifndef RDATA_IN_1_WKS_11_C @@ -20,6 +18,16 @@ #include #include +/* + * Redefine CHECK here so cppcheck "sees" the define. + */ +#ifndef CHECK +#define CHECK(op) \ + do { result = (op); \ + if (result != ISC_R_SUCCESS) goto cleanup; \ + } while (0) +#endif + #define RRTYPE_WKS_ATTRIBUTES (0) static isc_mutex_t wks_lock;