From dfae99da76ec1aaedb7d0c3a859e2488825e75d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Tue, 7 May 2024 21:06:11 +0200 Subject: [PATCH] Fix unused variable `Silent` in `client.cpp` on Android --- src/engine/client/client.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index 946970efc..3ff8018e3 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -4262,16 +4262,6 @@ int main(int argc, const char **argv) #endif CCmdlineFix CmdlineFix(&argc, &argv); - bool Silent = false; - - for(int i = 1; i < argc; i++) - { - if(str_comp("-s", argv[i]) == 0 || str_comp("--silent", argv[i]) == 0) - { - Silent = true; - } - } - #if defined(CONF_PLATFORM_ANDROID) InitAndroid(); #endif @@ -4285,6 +4275,14 @@ int main(int argc, const char **argv) #if defined(CONF_PLATFORM_ANDROID) pStdoutLogger = std::shared_ptr(log_logger_android()); #else + bool Silent = false; + for(int i = 1; i < argc; i++) + { + if(str_comp("-s", argv[i]) == 0 || str_comp("--silent", argv[i]) == 0) + { + Silent = true; + } + } if(!Silent) { pStdoutLogger = std::shared_ptr(log_logger_stdout());