aboutsummaryrefslogtreecommitdiffstats
path: root/wireshark-qt.cpp
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2015-11-21 23:48:27 +0000
committerMichael Mann <mmann78@netscape.net>2015-12-12 16:21:19 +0000
commit2aab706c5a5d61c61bbff6e9e36a57afc4ef3be8 (patch)
tree311fa08b5404d23cc4cfa644c87f84ab7422b61f /wireshark-qt.cpp
parent95142cf09d4789c9c68108b56f5fbe467108494f (diff)
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 <alexis.lagoutte@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'wireshark-qt.cpp')
-rw-r--r--wireshark-qt.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/wireshark-qt.cpp b/wireshark-qt.cpp
index 4033b5d201..18605ff80d 100644
--- a/wireshark-qt.cpp
+++ b/wireshark-qt.cpp
@@ -616,17 +616,15 @@ int main(int argc, char *argv[])
*/
// XXX Should the remaining code be in WiresharkApplcation::WiresharkApplication?
#define OPTSTRING OPTSTRING_CAPTURE_COMMON "C:g:Hh" "jJ:kK:lm:nN:o:P:r:R:St:u:vw:X:Y:z:"
-DIAG_OFF(cast-qual)
static const struct option long_options[] = {
- {(char *)"help", no_argument, NULL, 'h'},
- {(char *)"read-file", required_argument, NULL, 'r' },
- {(char *)"read-filter", required_argument, NULL, 'R' },
- {(char *)"display-filter", required_argument, NULL, 'Y' },
- {(char *)"version", no_argument, NULL, 'v'},
+ {"help", no_argument, NULL, 'h'},
+ {"read-file", required_argument, NULL, 'r' },
+ {"read-filter", required_argument, NULL, 'R' },
+ {"display-filter", required_argument, NULL, 'Y' },
+ {"version", no_argument, NULL, 'v'},
LONGOPT_CAPTURE_COMMON
{0, 0, 0, 0 }
};
-DIAG_ON(cast-qual)
static const char optstring[] = OPTSTRING;
opterr = 0;