From patchwork Fri Sep 30 11:52:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Disseldorp X-Patchwork-Id: 9358051 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CE6336075E for ; Fri, 30 Sep 2016 11:53:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B2D6D29FD2 for ; Fri, 30 Sep 2016 11:53:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A49FE29FD5; Fri, 30 Sep 2016 11:53:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 709C329FD2 for ; Fri, 30 Sep 2016 11:53:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932320AbcI3LxT (ORCPT ); Fri, 30 Sep 2016 07:53:19 -0400 Received: from mx2.suse.de ([195.135.220.15]:48583 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932105AbcI3LxS (ORCPT ); Fri, 30 Sep 2016 07:53:18 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 753FEAC7E for ; Fri, 30 Sep 2016 11:52:28 +0000 (UTC) From: David Disseldorp To: fstests@vger.kernel.org Cc: David Disseldorp Subject: [PATCH] fsx: fix compiler warning due to bad prototype Date: Fri, 30 Sep 2016 13:52:18 +0200 Message-Id: <1475236338-7906-1-git-send-email-ddiss@suse.de> X-Mailer: git-send-email 2.6.6 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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",