From patchwork Fri Feb 9 15:50:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Dickson X-Patchwork-Id: 10209489 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 E2F9F60236 for ; Fri, 9 Feb 2018 15:51:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D3E2629933 for ; Fri, 9 Feb 2018 15:51:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D261629B01; Fri, 9 Feb 2018 15:51:26 +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 AF59F29933 for ; Fri, 9 Feb 2018 15:50:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751049AbeBIPup (ORCPT ); Fri, 9 Feb 2018 10:50:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50572 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751070AbeBIPup (ORCPT ); Fri, 9 Feb 2018 10:50:45 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EB9013F738 for ; Fri, 9 Feb 2018 15:50:44 +0000 (UTC) Received: from steved.boston.devel.redhat.com (ovpn-116-113.phx2.redhat.com [10.3.116.113]) by smtp.corp.redhat.com (Postfix) with ESMTP id A6F11608F9 for ; Fri, 9 Feb 2018 15:50:44 +0000 (UTC) From: Steve Dickson To: Linux NFS Mailing list Subject: [PATCH 1/1] Remove warnings from rpcgen generated files Date: Fri, 9 Feb 2018 10:50:42 -0500 Message-Id: <20180209155042.28461-2-steved@redhat.com> In-Reply-To: <20180209155042.28461-1-steved@redhat.com> References: <20180209155042.28461-1-steved@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 09 Feb 2018 15:50:44 +0000 (UTC) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The xdr c-files, generated from .x by rpcgen, in both libnsm.a and libexport.a libraries cause the following warnings: mount_xdr.c:43:20: warning: unused variable 'buf' [-Wunused-variable] sm_inter_xdr.c:37:20: warning: unused variable 'buf' [-Wunused-variable] sm_inter_xdr.c:51:6: warning: unused variable 'i' [-Wunused-variable] These warnings are caused by rpcgen trying in inline the xdr routines. It turns out no inlining was happening, except for one routine. So turning off inlining eliminated these warnings. This patch also eliminates a Werror missing-prototypes in sm_inter.h Signed-off-by: Steve Dickson --- support/export/Makefile.am | 2 +- support/nsm/Makefile.am | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/support/export/Makefile.am b/support/export/Makefile.am index be3de69..13f7a49 100644 --- a/support/export/Makefile.am +++ b/support/export/Makefile.am @@ -35,7 +35,7 @@ $(GENFILES_CLNT): %_clnt.c: %.x $(RPCGEN) $(GENFILES_XDR): %_xdr.c: %.x $(RPCGEN) test -f $@ && rm -rf $@ || true - $(RPCGEN) -c -o $@ $< + $(RPCGEN) -c -i 0 -o $@ $< $(GENFILES_H): %.h: %.x $(RPCGEN) test -f $@ && rm -rf $@ || true diff --git a/support/nsm/Makefile.am b/support/nsm/Makefile.am index 2038e68..8f5874e 100644 --- a/support/nsm/Makefile.am +++ b/support/nsm/Makefile.am @@ -32,11 +32,12 @@ $(GENFILES_SVC): %_svc.c: %.x $(RPCGEN) $(GENFILES_XDR): %_xdr.c: %.x $(RPCGEN) test -f $@ && rm -rf $@ || true - $(RPCGEN) -c -o $@ $< + $(RPCGEN) -c -i 0 -o $@ $< $(GENFILES_H): %.h: %.x $(RPCGEN) test -f $@ && rm -rf $@ || true $(RPCGEN) -h -o $@ $< + echo "void sm_prog_1(struct svc_req *, SVCXPRT *);" >> $@ rm -f $(top_builddir)/support/include/sm_inter.h $(LN_S) ../nsm/sm_inter.h $(top_builddir)/support/include/sm_inter.h