[debugserver] Fix that is_dot_app is producing unused warnings
authorRaphael Isemann <teemperor@gmail.com>
Mon, 3 Aug 2020 08:23:48 +0000 (10:23 +0200)
committerRaphael Isemann <teemperor@gmail.com>
Mon, 3 Aug 2020 08:24:21 +0000 (10:24 +0200)
Some build configurations don't use this static function.

lldb/tools/debugserver/source/debugserver.cpp

index 4e6aa39..04cbd2c 100644 (file)
@@ -212,19 +212,21 @@ RNBRunLoopMode RNBRunLoopLaunchInferior(RNBRemote *remote,
     // Our default launch method is posix spawn
     launch_flavor = eLaunchFlavorPosixSpawn;
 
+    const bool dot_app = is_dot_app(inferior_argv[0]);
+    (void)dot_app;
 #if defined WITH_FBS
     // Check if we have an app bundle, if so launch using BackBoard Services.
-    if (is_dot_app(inferior_argv[0])) {
+    if (dot_app) {
       launch_flavor = eLaunchFlavorFBS;
     }
 #elif defined WITH_BKS
     // Check if we have an app bundle, if so launch using BackBoard Services.
-    if (is_dot_app(inferior_argv[0])) {
+    if (dot_app) {
       launch_flavor = eLaunchFlavorBKS;
     }
 #elif defined WITH_SPRINGBOARD
     // Check if we have an app bundle, if so launch using SpringBoard.
-    if (is_dot_app(inferior_argv[0])) {
+    if (dot_app) {
       launch_flavor = eLaunchFlavorSpringBoard;
     }
 #endif