diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-02-17 13:33:15 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-02-18 05:01:00 +0000 |
commit | 630f54fbbc05d04ebc7007a2d6762514f5c066aa (patch) | |
tree | 6f7090178d2554b33d033fdb4078b30b2b5ce726 /wireshark-qt.cpp | |
parent | b3f3d669e5f3c1f04d7d6c771da8604e25a71eec (diff) |
Fix various warnings in wireshark-qt.cpp.
Squelch warnings due to (char *) casts.
Use "include_directories(SYSTEM..." in CMakeLists.txt so that we
don't get pedantic warnings about things we can't easily fix such
as QList loop optimizations. Not sure if there's an easy way to do
this in Autotools.
Pass get_gui_compiled_info to init_progfile_dir. C++ don't have to
show you any stinkin' ::main.
warning: ISO C++ forbids taking address of function ‘::main’ [-Wpedantic]
Change-Id: If1c77284ab0d1b4786bce4e926a4109dd9b1ae34
Reviewed-on: https://code.wireshark.org/review/7207
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'wireshark-qt.cpp')
-rw-r--r-- | wireshark-qt.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/wireshark-qt.cpp b/wireshark-qt.cpp index c44cc7d1b8..30a1bce60f 100644 --- a/wireshark-qt.cpp +++ b/wireshark-qt.cpp @@ -49,6 +49,7 @@ #endif #include <wsutil/report_err.h> #include <wsutil/u3.h> +#include <wsutil/ws_diag_control.h> #include <wsutil/ws_version_info.h> #include <epan/addr_resolv.h> @@ -481,7 +482,8 @@ int main(int argc, char *argv[]) /* * Attempt to get the pathname of the executable file. */ - /* init_progfile_dir_error = */ init_progfile_dir(argv[0], main); + /* init_progfile_dir_error = */ init_progfile_dir(argv[0], + (progfile_main_t) get_gui_compiled_info); g_log(NULL, G_LOG_LEVEL_DEBUG, "progfile_dir: %s", get_progfile_dir()); /* Get the compile-time version information string */ @@ -528,6 +530,7 @@ 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' }, @@ -537,6 +540,7 @@ int main(int argc, char *argv[]) LONGOPT_CAPTURE_COMMON {0, 0, 0, 0 } }; +DIAG_ON(cast-qual) static const char optstring[] = OPTSTRING; opterr = 0; |