From patchwork Wed Jun 28 11:08:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Oberhollenzer X-Patchwork-Id: 781555 X-Patchwork-Delegate: david.oberhollenzer@sigma-star.at Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wyKp55qCPz9s4q for ; Wed, 28 Jun 2017 21:10:21 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tzrB4464"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=yCaLW/385cSlK38TWjIgyLC6pzPpT7gI6w42EpQyH5k=; b=tzrB4464jKa8nmOcRjL3yv+m23 vsLf0k9dcHHI/8xk2kFH+EGgVR3PFDvS6sxD3m9RaHswCGQVO6ESoiIde8eozm9cTXCd6L8zihtWr dPMKnqAXNZGjWyP2OOI0Xv/zd8OS6aFG2F/sl84iTSe5jTDn/Jr6Ie/mS1m6JteRMPkpUjcFtKjb+ jsfeeturV9QbWhHuDoef1V1CEJPXXxdpFyBHWlmkAnIvIQud077ZFqYzaWKAwHVZcpgZTaQKE8xAS iUcnplSPmz8JftDpKjsECiKXh6jddrvxhOkfj2PoL1mFtgtFvYNuw9FqnRpapImU570nu5ZJ82t99 IVn1vh+A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dQArO-0000ca-JL; Wed, 28 Jun 2017 11:10:14 +0000 Received: from mail.sigma-star.at ([95.130.255.111]) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dQAqg-0006gb-5s for linux-mtd@lists.infradead.org; Wed, 28 Jun 2017 11:09:33 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.sigma-star.at (Postfix) with ESMTP id 69F5324E0015 for ; Wed, 28 Jun 2017 13:08:44 +0200 (CEST) Received: from linux-4sv6.suse (unknown [82.150.214.13]) by mail.sigma-star.at (Postfix) with ESMTPSA id CFC4C24E0018; Wed, 28 Jun 2017 13:08:42 +0200 (CEST) From: David Oberhollenzer To: linux-mtd@lists.infradead.org Subject: [PATCH 8/9] Silence warnings about unused arguments Date: Wed, 28 Jun 2017 13:08:18 +0200 Message-Id: <20170628110819.30563-9-david.oberhollenzer@sigma-star.at> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20170628110819.30563-1-david.oberhollenzer@sigma-star.at> References: <20170628110819.30563-1-david.oberhollenzer@sigma-star.at> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170628_040930_678785_4B83C17A X-CRM114-Status: GOOD ( 12.95 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Oberhollenzer MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org This patch deals with functions that need to have a certain signature, but don't make use of all the arguments (e.g. signal handlers). Signed-off-by: David Oberhollenzer --- lib/execinfo.c | 3 +++ tests/fs-tests/utils/fstest_monitor.c | 2 ++ tests/jittertest/JitterTest.c | 6 ++++++ 3 files changed, 11 insertions(+) diff --git a/lib/execinfo.c b/lib/execinfo.c index a59f6a9..499b0c3 100644 --- a/lib/execinfo.c +++ b/lib/execinfo.c @@ -7,6 +7,7 @@ int backtrace(void **buffer, int size) { void *addr = __builtin_return_address(0); + (void)buffer; (void)size; errmsg("backtrace() is not implemented. Called from %p", addr); return 0; @@ -14,12 +15,14 @@ int backtrace(void **buffer, int size) char **backtrace_symbols(void *const *buffer, int size) { + (void)buffer; (void)size; errmsg("backtrace_symbols() is not implemented"); return NULL; } void backtrace_symbols_fd(void *const *buffer, int size, int fd) { + (void)buffer; (void)size; (void)fd; errmsg("backtrace_symbols_fd() is not implemented"); } #endif /* !HAVE_EXECINFO_H */ diff --git a/tests/fs-tests/utils/fstest_monitor.c b/tests/fs-tests/utils/fstest_monitor.c index 58946cc..afb951b 100644 --- a/tests/fs-tests/utils/fstest_monitor.c +++ b/tests/fs-tests/utils/fstest_monitor.c @@ -177,6 +177,7 @@ static int parse_command_line(char *cmdline, int *pargc, char ***pargv) static void signal_handler(int signum) { + (void)signum; kill_children(); } @@ -185,6 +186,7 @@ int alarm_gone_off = 0; static void alarm_handler(int signum) { + (void)signum; if (!result) alarm_gone_off = 1; kill_children(); diff --git a/tests/jittertest/JitterTest.c b/tests/jittertest/JitterTest.c index 0364a00..4627fb0 100644 --- a/tests/jittertest/JitterTest.c +++ b/tests/jittertest/JitterTest.c @@ -426,6 +426,8 @@ void SignalHandler( char tmpBuf[200]; /* Note sigNum not used. */ + (void)sigNum; + printf("Ctrl+C detected. Worst Jitter time was:%fms.\nJitterTest exiting.\n", (float)LastMaxDiff/1000.0); @@ -458,6 +460,8 @@ static void doGrabKProfile(int jitterusec, char *fileName) int readBytes; char readBuf[4096]; + (void)jitterusec; + if((fdSnapshot = open(fileName, O_WRONLY | O_CREAT, S_IRWXU)) <= 0) { fprintf(stderr, "Could not open file %s.\n", fileName); @@ -553,6 +557,8 @@ void AlarmHandler( if invoked < 1sec apart. */ + (void)sigNum; + if (gettimeofday(&CurrTimeVal, NULL) == (int) 0) { /*----------------------------------------------------------------