From: David Disseldorp Date: Fri, 30 Sep 2016 11:52:18 +0000 (+0200) Subject: fsx: fix compiler warning due to bad prototype X-Git-Tag: v2022.05.01~2337 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3ea91b080b42eab74a636bd4c2c15946715bcd5e;p=users%2Fhch%2Fxfstests-dev.git fsx: fix compiler warning due to bad prototype 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 Reviewed-by: Christoph Hellwig Signed-off-by: Eryu Guan --- diff --git a/ltp/fsx.c b/ltp/fsx.c index a7b36c14e..ebe8ecf88 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) @@ -1531,17 +1538,6 @@ out: } -void -cleanup(sig) - int sig; -{ - if (sig) - prt("signal %d\n", sig); - prt("testcalls = %lu\n", testcalls); - exit(sig); -} - - void usage(void) {