git: 11ac8a326d5f - stable/12 - Adjust local_rpcb() definition to avoid clang 15 warning
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 27 Jul 2022 19:21:31 UTC
The branch stable/12 has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=11ac8a326d5f967e8f85e89984c00359f61f540c
commit 11ac8a326d5f967e8f85e89984c00359f61f540c
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-24 21:28:43 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-27 19:21:14 +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
(cherry picked from commit e87d90a9dce22003d79ae895bac5ce2d0ca029fe)
---
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;