diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-08-27 14:56:29 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-08-27 21:57:30 +0000 |
commit | 2e67941b4ca8c96f89a040194565606716dbd8e0 (patch) | |
tree | 9ca32d667d8c9386e673a36f22c209eede10cfdd /wsutil | |
parent | c7ce0e0c222e367534834f34323adc109345c114 (diff) | |
download | wireshark-2e67941b4ca8c96f89a040194565606716dbd8e0.tar.gz wireshark-2e67941b4ca8c96f89a040194565606716dbd8e0.tar.bz2 wireshark-2e67941b4ca8c96f89a040194565606716dbd8e0.zip |
Use the <wsutil/ws_diag_control.h> stuff to disable -Wdeprecated-declarations.
Change-Id: I4b1fcbf5b25f2515d45015c9e1c4a94d6cfbc79c
Reviewed-on: https://code.wireshark.org/review/3883
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wsutil')
-rw-r--r-- | wsutil/wsgcrypt.h | 42 |
1 files changed, 3 insertions, 39 deletions
diff --git a/wsutil/wsgcrypt.h b/wsutil/wsgcrypt.h index 2d2deb1a3d..2591b92516 100644 --- a/wsutil/wsgcrypt.h +++ b/wsutil/wsgcrypt.h @@ -29,49 +29,13 @@ #ifdef HAVE_LIBGCRYPT -#ifdef __CLANG__ +#include <wsutil/ws_diag_control.h> -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" -#include <gcrypt.h> -#pragma clang diagnostic pop - -#else - -#if defined(__GNUC__) && defined(__GNUC_MINOR__) -#define _GCC_VERSION (__GNUC__*100 + __GNUC_MINOR__*10) -#else -#define _GCC_VERSION 0 -#endif - -/* check the gcc version - pragma GCC diagnostic error/warning was introduced in gcc 4.2.0 - pragma GCC diagnostic push/pop was introduced in gcc 4.6.0 */ - -#if _GCC_VERSION<420 - -/* no gcc or gcc version<4.2.0: we can't do anything */ -#include <gcrypt.h> - -#elif _GCC_VERSION<460 - -/* gcc version is between 4.2.0 and 4.6.0: - diagnostic warning/error is supported, diagnostic push/pop is not supported */ -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#include <gcrypt.h> -#pragma GCC diagnostic error "-Wdeprecated-declarations" - -#else +DIAG_OFF(deprecated-declarations) -/* gcc version is >= 4.6.0: we can use push/pop */ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #include <gcrypt.h> -#pragma GCC diagnostic pop - -#endif /* _GCC_VERSION */ -#endif /* __CLANG__ */ +DIAG_ON(deprecated-declarations) #endif /* HAVE_LIBGCRYPT */ |