aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2017-04-24 02:30:53 +0000
committerDamjan Marion <dmarion.lists@gmail.com>2017-04-24 20:43:41 +0000
commit86326daeaa10c5ce4a8aa0b6d97c75a3bbb73493 (patch)
tree988a3bc71155494d8de80f7a0bfcd516821d5f6f
parent757585db71b78c4edf91ba011be419264de43d1a (diff)
BFD: disable gcc6 warnings in helper macros
Change-Id: Ibec3f1a2619d593accd8c560fb29d39d5617e16a Signed-off-by: Klement Sekera <ksekera@cisco.com>
-rw-r--r--src/vnet/bfd/bfd_cli.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/vnet/bfd/bfd_cli.c b/src/vnet/bfd/bfd_cli.c
index 44e671c534e..b2cd8df2eea 100644
--- a/src/vnet/bfd/bfd_cli.c
+++ b/src/vnet/bfd/bfd_cli.c
@@ -385,8 +385,19 @@ 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 \
if (mandatory == r && !have_##n) \
+ PRAGMA_STR2 \
{ \
ret = clib_error_return (0, "Required parameter `%s' missing.", s); \
goto out; \