summaryrefslogtreecommitdiff
path: root/diag-control.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-03-20 21:47:55 -0700
committerGuy Harris <guy@alum.mit.edu>2018-03-20 21:47:55 -0700
commit31f3baed07fd292cdc604f6abd35d4caee3c6053 (patch)
tree7e0e8dde0fd8a92a80ab9169d4b6bf25919a8a5a /diag-control.h
parentdfbfa4cf432d904b6a7d2cbbc50ecf22f8301a39 (diff)
downloadlibpcap-31f3baed07fd292cdc604f6abd35d4caee3c6053.tar.gz
Suppress warnings in Flex-generated code.
Diffstat (limited to 'diag-control.h')
-rw-r--r--diag-control.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/diag-control.h b/diag-control.h
index ca86f6be..72ded1c3 100644
--- a/diag-control.h
+++ b/diag-control.h
@@ -37,6 +37,19 @@
#include "pcap/compiler-tests.h"
+/*
+ * Suppress Flex warnings.
+ */
+#if defined(_MSC_VER)
+ #define DIAG_OFF_FLEX \
+ __pragma(warning(push)) \
+ __pragma(warning(disable:4127))
+ #define DIAG_ON_FLEX __pragma(warning(pop))
+#else
+ #define DIAG_OFF_FLEX
+ #define DIAG_ON_FLEX
+#endif
+
#ifdef YYBYACC
/*
* Berkeley YACC.