From 390dc1c24568f682d31c2cef3259025cea2c0c52 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 11 May 2023 00:30:15 -0500 Subject: [PATCH] Fix unused-but-set-variable warnings on Mac and Linux --- src/config.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/config.cpp b/src/config.cpp index 5d5f1f87..d723fa06 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -1101,8 +1101,10 @@ namespace config { int parse(int argc, char *argv[]) { std::unordered_map cmd_vars; +#ifdef _WIN32 bool shortcut_launch = false; bool service_admin_launch = false; +#endif for (auto x = 1; x < argc; ++x) { auto line = argv[x]; @@ -1111,12 +1113,14 @@ namespace config { print_help(*argv); return 1; } +#ifdef _WIN32 else if (line == "--shortcut"sv) { shortcut_launch = true; } else if (line == "--shortcut-admin"sv) { service_admin_launch = true; } +#endif else if (*line == '-') { if (*(line + 1) == '-') { sunshine.cmd.name = line + 2;