aboutsummaryrefslogtreecommitdiffstats
path: root/ws_diag_control.h
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2018-02-22 08:03:12 +0100
committerGuy Harris <guy@alum.mit.edu>2018-02-28 21:47:34 +0000
commit9226ea8dee19d509b7c430970d29055cc199b2dd (patch)
tree1c329f547363ce890c2dd6281bfb5837cbb9b885 /ws_diag_control.h
parent16ac61e2a353fbf940cf8eeee9d5018ea2a12641 (diff)
flex: add also (-W)unreachable-code to ignore warning (for flex generate file)
Change-Id: I09ab6d91b45113432255cb20ae30440ea0438b23 Reviewed-on: https://code.wireshark.org/review/25984 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ws_diag_control.h')
-rw-r--r--ws_diag_control.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/ws_diag_control.h b/ws_diag_control.h
index 9829342626..bad6f0f573 100644
--- a/ws_diag_control.h
+++ b/ws_diag_control.h
@@ -139,6 +139,7 @@ extern "C" {
*
* -Wsigned-compare warnings
* -Wshorten-64-to-32 warnings, if the compiler *has* -Wshorten-64-to-32
+ * -Wunreachable-code warnings
*
* We use DIAG_OFF() and DIAG_ON(), so we only use features that the
* compiler supports.
@@ -155,8 +156,10 @@ extern "C" {
#if defined(__clang__) || defined(__APPLE__)
#define DIAG_OFF_FLEX \
DIAG_OFF(sign-compare) \
- DIAG_OFF(shorten-64-to-32)
+ DIAG_OFF(shorten-64-to-32) \
+ DIAG_OFF(unreachable-code)
#define DIAG_ON_FLEX \
+ DIAG_OFF(unreachable-code) \
DIAG_ON(shorten-64-to-32) \
DIAG_ON(sign-compare)
#else