From 2aab706c5a5d61c61bbff6e9e36a57afc4ef3be8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Valverde?= Date: Sat, 21 Nov 2015 23:48:27 +0000 Subject: Remove -Wwrite-strings compiler flag The "-Wwrite-strings" flag produces nuisance warnings. These warnings are not useful, they're impossible to fix in a sane way and therefore are being handled with casts of static strings to (char *). This just moves the warning to [-Wcast-qual] and a compiler pragma is in turn required (and used) to squelch that warning. Remove the Wwrite-strings warning. Let that responsibility fall on the programmer (as is done by casting). Change-Id: I5a44dfd9decd6d80797a521a3373593074962fb5 Reviewed-on: https://code.wireshark.org/review/12162 Petri-Dish: Alexis La Goutte Reviewed-by: Alexis La Goutte Reviewed-by: Michael Mann --- tfshark.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'tfshark.c') diff --git a/tfshark.c b/tfshark.c index 310b4a6e30..015184dec9 100644 --- a/tfshark.c +++ b/tfshark.c @@ -761,13 +761,11 @@ main(int argc, char *argv[]) GString *runtime_info_str; char *init_progfile_dir_error; int opt; -DIAG_OFF(cast-qual) static const struct option long_options[] = { - {(char *)"help", no_argument, NULL, 'h'}, - {(char *)"version", no_argument, NULL, 'v'}, + {"help", no_argument, NULL, 'h'}, + {"version", no_argument, NULL, 'v'}, {0, 0, 0, 0 } }; -DIAG_ON(cast-qual) gboolean arg_error = FALSE; char *gpf_path, *pf_path; -- cgit v1.2.1