Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
add warning control macro set
[vpp.git]
/
src
/
vnet
/
bfd
/
bfd_cli.c
diff --git
a/src/vnet/bfd/bfd_cli.c
b/src/vnet/bfd/bfd_cli.c
index
a533bb7
..
0e73172
100644
(file)
--- a/
src/vnet/bfd/bfd_cli.c
+++ b/
src/vnet/bfd/bfd_cli.c
@@
-20,6
+20,7
@@
#include <vlib/vlib.h>
#include <vlib/cli.h>
#include <vppinfra/format.h>
#include <vlib/vlib.h>
#include <vlib/cli.h>
#include <vppinfra/format.h>
+#include <vppinfra/warnings.h>
#include <vnet/api_errno.h>
#include <vnet/ip/format.h>
#include <vnet/bfd/bfd_api.h>
#include <vnet/api_errno.h>
#include <vnet/ip/format.h>
#include <vnet/bfd/bfd_api.h>
@@
-385,20
+386,11
@@
static const unsigned optional = 0;
have_##n = 1; \
}
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, ...) \
#define CHECK_MANDATORY(t, n, s, r, ...) \
-
PRAGMA_STR1
\
+
WARN_OFF(tautological-compare)
\
if (mandatory == r && !have_##n) \
{ \
if (mandatory == r && !have_##n) \
{ \
-
PRAGMA_STR2
\
+
WARN_ON(tautological-compare)
\
ret = clib_error_return (0, "Required parameter `%s' missing.", s); \
goto out; \
}
ret = clib_error_return (0, "Required parameter `%s' missing.", s); \
goto out; \
}