[glib] gtester: fix -Wduplicated-branches



commit c97922c1047abcbaf3f4b5632523ab891db5efa2
Author: Ernestas Kulik <ernestask gnome org>
Date:   Tue Feb 13 20:57:04 2018 +0200

    gtester: fix -Wduplicated-branches
    
    One of the “quick” or “slow” test run modes is always added to the
    argument list, making the branching pointless, which, coincidentally,
    now causes a warning.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=793399

 glib/gtester.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/glib/gtester.c b/glib/gtester.c
index 9451aea56..a799394a7 100644
--- a/glib/gtester.c
+++ b/glib/gtester.c
@@ -322,10 +322,8 @@ launch_test_binary (const char *binary,
     argc++;
   if (!subtest_mode_fatal)
     argc++;
-  if (subtest_mode_quick)
-    argc++;
-  else
-    argc++;
+  /* Either -m=quick or -m=slow is always appended. */
+  argc++;
   if (subtest_mode_perf)
     argc++;
   if (!subtest_mode_undefined)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]