From patchwork Mon Sep 3 11:13:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 965383 X-Patchwork-Delegate: petr.vorel@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 423nQg3tddz9s55 for ; Mon, 3 Sep 2018 21:13:47 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 746D03E70BD for ; Mon, 3 Sep 2018 13:13:44 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it [IPv6:2001:4b78:1:20::5]) by picard.linux.it (Postfix) with ESMTP id 2BFC13E7083 for ; Mon, 3 Sep 2018 13:13:42 +0200 (CEST) Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by in-5.smtp.seeweb.it (Postfix) with ESMTPS id A57AD600B11 for ; Mon, 3 Sep 2018 13:13:40 +0200 (CEST) Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id CBC97AFAC for ; Mon, 3 Sep 2018 11:13:39 +0000 (UTC) From: Cyril Hrubis To: ltp@lists.linux.it Date: Mon, 3 Sep 2018 13:13:31 +0200 Message-Id: <20180903111331.19189-1-chrubis@suse.cz> X-Mailer: git-send-email 2.16.4 X-Virus-Scanned: clamav-milter 0.99.2 at in-5.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.2 required=7.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-5.smtp.seeweb.it Subject: [LTP] [COMMITTED] [PATCH] lib/tst_test.c: Silence warnings. X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" The tst_brk() will call exit() which will exit the test but the compiler does not know about this and produces useless warnings about fall through in switch(). Signed-off-by: Cyril Hrubis --- lib/tst_test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/tst_test.c b/lib/tst_test.c index bdd47f562..adc525a1e 100644 --- a/lib/tst_test.c +++ b/lib/tst_test.c @@ -352,6 +352,7 @@ static void check_child_status(pid_t pid, int status) case TBROK: case TCONF: tst_brk(ret, "Reported by child (%i)", pid); + break; default: tst_brk(TBROK, "Invalid child (%i) exit value %i", pid, ret); } @@ -493,6 +494,7 @@ static void parse_opts(int argc, char *argv[]) case '?': print_help(); tst_brk(TBROK, "Invalid option"); + break; case 'h': print_help(); exit(0);