All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fsx: fix compiler warning due to bad prototype
@ 2016-09-30 11:52 David Disseldorp
  2016-09-30 11:57 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: David Disseldorp @ 2016-09-30 11:52 UTC (permalink / raw)
  To: fstests; +Cc: David Disseldorp

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fsx: fix compiler warning due to bad prototype
  2016-09-30 11:52 [PATCH] fsx: fix compiler warning due to bad prototype David Disseldorp
@ 2016-09-30 11:57 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2016-09-30 11:57 UTC (permalink / raw)
  To: David Disseldorp; +Cc: fstests

Looks fine,

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-30 11:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-30 11:52 [PATCH] fsx: fix compiler warning due to bad prototype David Disseldorp
2016-09-30 11:57 ` Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.