From: David Disseldorp <ddiss@suse.de>
To: fstests@vger.kernel.org
Cc: David Disseldorp <ddiss@suse.de>
Subject: [PATCH] fsx: fix compiler warning due to bad prototype
Date: Fri, 30 Sep 2016 13:52:18 +0200 [thread overview]
Message-ID: <1475236338-7906-1-git-send-email-ddiss@suse.de> (raw)
I see the following with gcc 4.8.5 [-Wunprototyped-calls]:
warning: call to function 'cleanup' without a real prototype
Fix this by moving the function definition up, and dropping the
prototype.
Signed-off-by: David Disseldorp <ddiss@suse.de>
---
ltp/fsx.c | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/ltp/fsx.c b/ltp/fsx.c
index a7b36c1..ebe8ecf 100644
--- a/ltp/fsx.c
+++ b/ltp/fsx.c
@@ -1272,7 +1272,14 @@ do { \
TRIM_LEN(off, len, size); \
} while (0)
-void cleanup();
+void
+cleanup(int sig)
+{
+ if (sig)
+ prt("signal %d\n", sig);
+ prt("testcalls = %lu\n", testcalls);
+ exit(sig);
+}
static int
read_op(struct log_entry *log_entry)
@@ -1532,17 +1539,6 @@ out:
void
-cleanup(sig)
- int sig;
-{
- if (sig)
- prt("signal %d\n", sig);
- prt("testcalls = %lu\n", testcalls);
- exit(sig);
-}
-
-
-void
usage(void)
{
fprintf(stdout, "usage: %s",
--
2.6.6
next reply other threads:[~2016-09-30 11:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-30 11:52 David Disseldorp [this message]
2016-09-30 11:57 ` [PATCH] fsx: fix compiler warning due to bad prototype Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1475236338-7906-1-git-send-email-ddiss@suse.de \
--to=ddiss@suse.de \
--cc=fstests@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox