aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-02-13 13:51:05 -0800
committerGerald Combs <gerald@wireshark.org>2015-02-14 19:46:42 +0000
commite11d7ef08fc9b091e317d7cfd2abff1f21ca6276 (patch)
tree16e8747c450db96d68b8c8e0aeda085dfe6d53cf /wsutil
parent5cc0ad8672180128b32ef9e8f936011429665d88 (diff)
Fix diagnostics macros and squelch a gcc warning.
Both clang and gcc define __GNUC__. Make sure we account for that when defining diagnostic macros. Use DIAG_OFF + DIAG_ON to suppress gcc -pedantic warnings about frame_data. Get rid of packet_char_enc casts. Change-Id: Idbcc61bcdb35c1d20f185461c69451dcdf73bae9 Reviewed-on: https://code.wireshark.org/review/7106 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'wsutil')
-rw-r--r--wsutil/ws_diag_control.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/wsutil/ws_diag_control.h b/wsutil/ws_diag_control.h
index 375ab85171..c029dc1d98 100644
--- a/wsutil/ws_diag_control.h
+++ b/wsutil/ws_diag_control.h
@@ -45,7 +45,7 @@ extern "C" {
pragma clang diagnostic error/warning/ignored -Wxxx and
pragma clang diagnostic push/pop were introduced in clang 2.8 */
-#if defined(__GNUC__) && ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402
+#if defined(__GNUC__) && ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402 && !defined(__clang__)
/* gcc version is >= 4.2.0; we can use "GCC diagnostic ignored/warning
-Wxxx" */
# define DIAG_PRAGMA(x) DIAG_DO_PRAGMA(GCC diagnostic x)