diff options
author | Guy Harris <gharris@sonic.net> | 2020-10-24 13:53:23 -0700 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2020-10-24 13:53:23 -0700 |
commit | 5df29254347daab8ab9f530a0b9dfd0b32a40efc (patch) | |
tree | b66f82cce5fe4737bc631b8719c2cd424a6fcf06 /ui | |
parent | 5b2901d09015194682538d33be18900079aa0567 (diff) |
Apparently, WS_WIKI_URL() is unworkable not only in C++ but in C.
If you use it, GCC 9.3.0 seems to think there's a missing parenthesis
somewhere, just as the version of clang++ in my version of Xcode does,
even though other versions of GCC don't. I'm clearly missing something
obscure about C here; I give up.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/capture.c | 4 | ||||
-rw-r--r-- | ui/help_url.c | 12 | ||||
-rw-r--r-- | ui/qt/main.cpp | 11 | ||||
-rw-r--r-- | ui/urls.h | 5 |
4 files changed, 14 insertions, 18 deletions
diff --git a/ui/capture.c b/ui/capture.c index 22ebc96984..3072b37172 100644 --- a/ui/capture.c +++ b/ui/capture.c @@ -269,7 +269,7 @@ capture_input_read_all(capture_session *cap_session, gboolean is_tempfile, "\n" "Help about capturing can be found at\n" "\n" - " " WS_WIKI_URL("CaptureSetup") + " " WS_WIKI_HOME_URL "/" "CaptureSetup" #ifdef _WIN32 "\n\n" "Wireless (Wi-Fi/WLAN):\n" @@ -746,7 +746,7 @@ capture_input_closed(capture_session *cap_session, gchar *msg) "\n" "Help about capturing can be found at\n" "\n" - " " WS_WIKI_URL("CaptureSetup") + " " WS_WIKI_HOME_URL "/" "CaptureSetup" #ifdef _WIN32 "\n\n" "Wireless (Wi-Fi/WLAN):\n" diff --git a/ui/help_url.c b/ui/help_url.c index f50cfc76b2..31d18c4d67 100644 --- a/ui/help_url.c +++ b/ui/help_url.c @@ -102,22 +102,22 @@ topic_action_url(topic_action_e action) url = g_strdup(WS_Q_AND_A_URL); break; case(ONLINEPAGE_SAMPLE_FILES): - url = g_strdup(WS_WIKI_URL("SampleCaptures")); + url = g_strdup(WS_WIKI_HOME_URL "/" "SampleCaptures"); break; case(ONLINEPAGE_CAPTURE_SETUP): - url = g_strdup(WS_WIKI_URL("CaptureSetup")); + url = g_strdup(WS_WIKI_HOME_URL "/" "CaptureSetup"); break; case(ONLINEPAGE_NETWORK_MEDIA): - url = g_strdup(WS_WIKI_URL("CaptureSetup/NetworkMedia")); + url = g_strdup(WS_WIKI_HOME_URL "/" "CaptureSetup/NetworkMedia"); break; case(ONLINEPAGE_SAMPLE_CAPTURES): - url = g_strdup(WS_WIKI_URL("SampleCaptures")); + url = g_strdup(WS_WIKI_HOME_URL "/" "SampleCaptures"); break; case(ONLINEPAGE_SECURITY): - url = g_strdup(WS_WIKI_URL("Security")); + url = g_strdup(WS_WIKI_HOME_URL "/" "Security"); break; case(ONLINEPAGE_CHIMNEY): - url = g_strdup(WS_WIKI_URL("CaptureSetup/Offloading#chimney")); + url = g_strdup(WS_WIKI_HOME_URL "/" "CaptureSetup/Offloading#chimney"); break; /* local manual pages */ diff --git a/ui/qt/main.cpp b/ui/qt/main.cpp index 1efd285cc1..f767f403b3 100644 --- a/ui/qt/main.cpp +++ b/ui/qt/main.cpp @@ -334,11 +334,12 @@ check_and_warn_user_startup() cur_user = get_cur_username(); cur_group = get_cur_groupname(); simple_message_box(ESD_TYPE_WARN, &recent.privs_warn_if_elevated, - "Running as user \"%s\" and group \"%s\".\n" - "This could be dangerous.\n\n" - "If you're running Wireshark this way in order to perform live capture, " - "you may want to be aware that there is a better way documented at\n" - WS_WIKI_URL("CaptureSetup/CapturePrivileges"), cur_user, cur_group); + "Running as user \"%s\" and group \"%s\".\n" + "This could be dangerous.\n\n" + "If you're running Wireshark this way in order to perform live capture, " + "you may want to be aware that there is a better way documented at\n" + WS_WIKI_HOME_URL "/" "CaptureSetup/CapturePrivileges", + cur_user, cur_group); g_free(cur_user); g_free(cur_group); } @@ -16,8 +16,3 @@ #define WS_FAQ_URL "https://www.wireshark.org/faq.html" #define WS_Q_AND_A_URL "https://ask.wireshark.org" #define WS_WIKI_HOME_URL "https://gitlab.com/wireshark/wireshark/-/wikis" - -/* - * Construct a wiki URL given the path to the wiki page. - */ -#define WS_WIKI_URL(path) WS_WIKI_HOME_URL "/" path |