X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fbfd%2Fbfd_cli.c;h=0e73172b7cba13acfd1035e615fc87a1163d98e8;hb=beb85cc662beda891989872b90bfd2a95e3c7a5a;hp=a533bb74ea55aaed2f775061664f07c947ecc2db;hpb=0f85333a94e176ab915e583ff66c8774cdbda620;p=vpp.git diff --git a/src/vnet/bfd/bfd_cli.c b/src/vnet/bfd/bfd_cli.c index a533bb74ea5..0e73172b7cb 100644 --- a/src/vnet/bfd/bfd_cli.c +++ b/src/vnet/bfd/bfd_cli.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -385,20 +386,11 @@ static const unsigned optional = 0; have_##n = 1; \ } -#if __GNUC__ >= 6 -#define PRAGMA_STR1 \ - _Pragma ("GCC diagnostic ignored \"-Wtautological-compare\""); -#define PRAGMA_STR2 _Pragma ("GCC diagnostic pop"); -#else -#define PRAGMA_STR1 -#define PRAGMA_STR2 -#endif - #define CHECK_MANDATORY(t, n, s, r, ...) \ - PRAGMA_STR1 \ +WARN_OFF(tautological-compare) \ if (mandatory == r && !have_##n) \ { \ - PRAGMA_STR2 \ + WARN_ON(tautological-compare) \ ret = clib_error_return (0, "Required parameter `%s' missing.", s); \ goto out; \ }