From 1140b1151ea831a9fbbb59c40229ef0a2a908a9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Valverde?= Date: Sun, 22 May 2016 03:24:56 +0100 Subject: Add clang-specific DIAG_OFF pragma MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I7e02ca86122e3fe8a1c2db9d53b718e6e23c4e98 Reviewed-on: https://code.wireshark.org/review/15521 Reviewed-by: João Valverde --- ws_diag_control.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ws_diag_control.h') 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 */ -- cgit v1.2.1