git: e87d90a9dce2 - main - Adjust local_rpcb() definition to avoid clang 15 warning
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 24 Jul 2022 22:40:37 UTC
The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=e87d90a9dce22003d79ae895bac5ce2d0ca029fe commit e87d90a9dce22003d79ae895bac5ce2d0ca029fe Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-07-24 21:28:43 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-07-24 22:40:12 +0000 Adjust local_rpcb() definition to avoid clang 15 warning With clang 15, the following -Werror warning is produced: sys/rpc/rpcb_clnt.c:439:11: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] local_rpcb() ^ void This is because local_rpcb() is declared with a (void) argument list, but defined with an empty argument list. Make the definition match the declaration. MFC after: 3 days --- sys/rpc/rpcb_clnt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/rpc/rpcb_clnt.c b/sys/rpc/rpcb_clnt.c index 8a95999baaf4..b81ab66c9409 100644 --- a/sys/rpc/rpcb_clnt.c +++ b/sys/rpc/rpcb_clnt.c @@ -436,7 +436,7 @@ getclnthandle(host, nconf, targaddr) * rpcbind. Returns NULL on error and free's everything. */ static CLIENT * -local_rpcb() +local_rpcb(void) { CLIENT *client; struct socket *so;