diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-02-19 16:05:49 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-02-20 04:04:15 +0000 |
commit | 95382c3afb9d50ffc7c0d178dbe9d76c763d687c (patch) | |
tree | eee8a98844328b7ed7bc84b9156bcf3949d97903 /dumpcap.c | |
parent | 9423a13b2db427d15f6b3d11b73624fffc02608f (diff) | |
download | wireshark-95382c3afb9d50ffc7c0d178dbe9d76c763d687c.tar.gz |
Suppress a bunch of cast-qual warnings.
Squelch
warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
similar to g630f54f.
Change strtod to g_ascii_strtod to squelch a checkAPIs error.
Change-Id: Ib2d26ef89f08827a5adc07e35eaf876cd7b8d14e
Reviewed-on: https://code.wireshark.org/review/7269
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'dumpcap.c')
-rw-r--r-- | dumpcap.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -72,6 +72,7 @@ #include <wsutil/cmdarg_err.h> #include <wsutil/crash_info.h> +#include <wsutil/ws_diag_control.h> #include <wsutil/ws_version_info.h> #ifndef HAVE_GETOPT_LONG @@ -888,8 +889,10 @@ compile_capture_filter(const char *iface, pcap_t *pcap_h, * third argument to pcap_compile() as a const pointer. Cast * away the warning. */ +DIAG_OFF(cast-qual) if (pcap_compile(pcap_h, fcode, (char *)cfilter, 1, netmask) < 0) return FALSE; +DIAG_ON(cast-qual) return TRUE; } @@ -4225,12 +4228,14 @@ main(int argc, char *argv[]) GString *comp_info_str; GString *runtime_info_str; int opt; +DIAG_OFF(cast-qual) static const struct option long_options[] = { {(char *)"help", no_argument, NULL, 'h'}, {(char *)"version", no_argument, NULL, 'v'}, LONGOPT_CAPTURE_COMMON {0, 0, 0, 0 } }; +DIAG_ON(cast-qual) gboolean arg_error = FALSE; |