Fix unused-but-set-variable warnings on Mac and Linux
This commit is contained in:
@@ -1101,8 +1101,10 @@ namespace config {
|
|||||||
int
|
int
|
||||||
parse(int argc, char *argv[]) {
|
parse(int argc, char *argv[]) {
|
||||||
std::unordered_map<std::string, std::string> cmd_vars;
|
std::unordered_map<std::string, std::string> cmd_vars;
|
||||||
|
#ifdef _WIN32
|
||||||
bool shortcut_launch = false;
|
bool shortcut_launch = false;
|
||||||
bool service_admin_launch = false;
|
bool service_admin_launch = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
for (auto x = 1; x < argc; ++x) {
|
for (auto x = 1; x < argc; ++x) {
|
||||||
auto line = argv[x];
|
auto line = argv[x];
|
||||||
@@ -1111,12 +1113,14 @@ namespace config {
|
|||||||
print_help(*argv);
|
print_help(*argv);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#ifdef _WIN32
|
||||||
else if (line == "--shortcut"sv) {
|
else if (line == "--shortcut"sv) {
|
||||||
shortcut_launch = true;
|
shortcut_launch = true;
|
||||||
}
|
}
|
||||||
else if (line == "--shortcut-admin"sv) {
|
else if (line == "--shortcut-admin"sv) {
|
||||||
service_admin_launch = true;
|
service_admin_launch = true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else if (*line == '-') {
|
else if (*line == '-') {
|
||||||
if (*(line + 1) == '-') {
|
if (*(line + 1) == '-') {
|
||||||
sunshine.cmd.name = line + 2;
|
sunshine.cmd.name = line + 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user