diff mbox

fsx: fix compiler warning due to bad prototype

Message ID 1475236338-7906-1-git-send-email-ddiss@suse.de (mailing list archive)
State New, archived
Headers show

Commit Message

David Disseldorp Sept. 30, 2016, 11:52 a.m. UTC
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(-)

Comments

Christoph Hellwig Sept. 30, 2016, 11:57 a.m. UTC | #1
Looks fine,

Reviewed-by: Christoph Hellwig <hch@lst.de>
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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",