]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
use pre-existing DIAG_OFF macros
authorAlan T. DeKok <aland@freeradius.org>
Sun, 17 Jan 2021 14:22:46 +0000 (09:22 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 17 Jan 2021 14:22:46 +0000 (09:22 -0500)
src/lib/json/base.h
src/lib/json/json_missing.h
src/lib/util/dbuff_tests.c
src/protocols/radius/abinary.c
src/protocols/tacacs/tacacs.h

index a12c1c56b52dd80745e163da310288371a9d1478..6816817114ac77d3eb19ed509f53011248d7921a 100644 (file)
@@ -34,11 +34,10 @@ RCSIDH(json_h, "$Id$")
 #ifdef HAVE_JSON
 #  if defined(HAVE_JSONMC_JSON_H)
 
-#if defined(__APPLE__) && defined(__clang__)
-#pragma clang diagnostic ignored "-Wdocumentation-deprecated-sync"
-#endif
-
+DIAG_OFF(documentation-deprecated-sync)
 #    include <json-c/json.h>
+DIAG_ON(documentation-deprecated-sync);
+
 #  elif defined(HAVE_JSON_JSON_H)
 #    include <json/json.h>
 #  else
index 8c5b4aca67dfa683b73e23ecf5e5c499377aae37..63967cda3c0fcfaf3ee8104a9640b9a610d33c55 100644 (file)
@@ -29,11 +29,10 @@ RCSIDH(jsonc_missing_h, "$Id$")
 #ifdef HAVE_JSON
 #  if defined(HAVE_JSONMC_JSON_H)
 
-#if defined(__APPLE__) && defined(__clang__)
-#pragma clang diagnostic ignored "-Wdocumentation-deprecated-sync"
-#endif
-
+DIAG_OFF(documentation-deprecated-sync)
 #    include <json-c/json.h>
+DIAG_ON(documentation-deprecated-sync)
+
 #  elif defined(HAVE_JSON_JSON_H)
 #    include <json/json.h>
 #  else
index 5949100dd8ec696b47634952d36a382178c36122..77510f47242d42b6f04effaee514fb6af7442c1b 100644 (file)
@@ -13,9 +13,7 @@
  *     the floats are equal on a *bit* level, not on a *semantic*
  *     level.
  */
-#if defined(__clang__)
-#pragma clang diagnostic ignored "-Wfloat-equal"
-#endif
+DIAG_OFF(float-equal)
 
 #define TEST_CHECK_LEN(_got, _exp) \
 do { \
index bac382f4f53745039a9990808b86f53582057f47..27b610ec4f585bad86eef093d5799e33761236a4 100644 (file)
@@ -31,9 +31,7 @@ RCSID("$Id$")
 
 #include <ctype.h>
 
-#if defined(__clang__)
-#pragma clang diagnostic ignored "-Wflexible-array-extensions"
-#endif
+DIAG_OFF(flexible-array-extensions)
 
 /*
  * Two types of filters are supported, GENERIC and IP.  The identifiers
index a318cd15974cc68566e4ed11fa71e14ffd95f67a..701f67832e20de54b1755d2a08269a5409136d21 100644 (file)
@@ -258,9 +258,7 @@ typedef struct CC_HINT(__packed__) {
        uint8_t                         body[];
 } fr_tacacs_packet_acct_reply_hdr_t;
 
-#if defined(__clang__)
-#pragma clang diagnostic ignored "-Wflexible-array-extensions"
-#endif
+DIAG_OFF(flexible-array-extensions)
 
 typedef struct CC_HINT(__packed__) {
        fr_tacacs_packet_hdr_t                                  hdr;
@@ -281,6 +279,8 @@ typedef struct CC_HINT(__packed__) {
        };
 } fr_tacacs_packet_t;
 
+DIAG_ON(flexible-array-extensions)
+
 extern char const *fr_tacacs_packet_codes[];
 
 /** Used as the decoder ctx