aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2016-05-22 03:24:56 +0100
committerJoão Valverde <j@v6e.pt>2016-05-22 04:55:47 +0000
commit1140b1151ea831a9fbbb59c40229ef0a2a908a9f (patch)
treeed56f51c9ea5ff02daf0dcb847c6a4fe1685ed8b
parent77fd31e60a527899dfc7998f851bb8f4ab10b82b (diff)
Add clang-specific DIAG_OFF pragma
Change-Id: I7e02ca86122e3fe8a1c2db9d53b718e6e23c4e98 Reviewed-on: https://code.wireshark.org/review/15521 Reviewed-by: João Valverde <j@v6e.pt>
-rw-r--r--ws_diag_control.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/ws_diag_control.h b/ws_diag_control.h
index be6df0353c..75fa1c6eb9 100644
--- a/ws_diag_control.h
+++ b/ws_diag_control.h
@@ -67,6 +67,15 @@ extern "C" {
# endif
#endif
+/* Use for clang specific pragmas, so we can keep -Wpragmas enabled */
+#ifdef __clang__
+# define DIAG_OFF_CLANG(x) DIAG_OFF(x)
+# define DIAG_ON_CLANG(x) DIAG_ON(x)
+#else
+# define DIAG_OFF_CLANG(x)
+# define DIAG_ON_CLANG(x)
+#endif
+
#ifndef DIAG_OFF
/* no gcc or clang, or gcc version < 4.2.0, or clang version < 2.8:
we can't do anything */