aboutsummaryrefslogtreecommitdiffstats
path: root/editcap.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-02-19 16:05:49 -0800
committerGerald Combs <gerald@wireshark.org>2015-02-20 04:04:15 +0000
commit95382c3afb9d50ffc7c0d178dbe9d76c763d687c (patch)
treeeee8a98844328b7ed7bc84b9156bcf3949d97903 /editcap.c
parent9423a13b2db427d15f6b3d11b73624fffc02608f (diff)
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 'editcap.c')
-rw-r--r--editcap.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/editcap.c b/editcap.c
index bd7a71abe3..5fc83072bd 100644
--- a/editcap.c
+++ b/editcap.c
@@ -81,13 +81,14 @@
# include "wsutil/strptime.h"
#endif
-#include <wsutil/privileges.h>
+#include <wsutil/crash_info.h>
#include <wsutil/filesystem.h>
-#include <wsutil/report_err.h>
-#include <wsutil/strnatcmp.h>
#include <wsutil/md5.h>
#include <wsutil/plugins.h>
-#include <wsutil/crash_info.h>
+#include <wsutil/privileges.h>
+#include <wsutil/report_err.h>
+#include <wsutil/strnatcmp.h>
+#include <wsutil/ws_diag_control.h>
#include <wsutil/ws_version_info.h>
#include "ringbuffer.h" /* For RINGBUFFER_MAX_NUM_FILES */
@@ -881,11 +882,13 @@ main(int argc, char *argv[])
int i, j, err;
gchar *err_info;
int opt;
+DIAG_OFF(cast-qual)
static const struct option long_options[] = {
{(char *)"help", no_argument, NULL, 'h'},
{(char *)"version", no_argument, NULL, 'V'},
{0, 0, 0, 0 }
};
+DIAG_ON(cast-qual)
char *p;
guint32 snaplen = 0; /* No limit */
@@ -1074,7 +1077,7 @@ main(int argc, char *argv[])
break;
case 'E':
- err_prob = strtod(optarg, &p);
+ err_prob = g_ascii_strtod(optarg, &p);
if (p == optarg || err_prob < 0.0 || err_prob > 1.0) {
fprintf(stderr, "editcap: probability \"%s\" must be between 0.0 and 1.0\n",
optarg);