From c97922c1047abcbaf3f4b5632523ab891db5efa2 Mon Sep 17 00:00:00 2001 From: Ernestas Kulik Date: Tue, 13 Feb 2018 20:57:04 +0200 Subject: [PATCH] gtester: fix -Wduplicated-branches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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)