diff options
Diffstat (limited to 'diag-control.h')
-rw-r--r-- | diag-control.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/diag-control.h b/diag-control.h index 28ecca42..8fce70e5 100644 --- a/diag-control.h +++ b/diag-control.h @@ -68,6 +68,22 @@ #endif /* + * Suppress "switch statement has only a default case" warnings. + * There's a switch in bpf_filter.c that only has additional + * cases on Linux. + */ +#if defined(_MSC_VER) + #define DIAG_OFF_DEFAULT_ONLY_SWITCH \ + __pragma(warning(push)) \ + __pragma(warning(disable:4065)) + #define DIAG_ON_DEFAULT_ONLY_SWITCH \ + __pragma(warning(pop)) +#else + #define DIAG_OFF_DEFAULT_ONLY_SWITCH + #define DIAG_ON_DEFAULT_ONLY_SWITCH +#endif + +/* * Suppress Flex, narrowing, and deprecation warnings. */ #if defined(_MSC_VER) |