Date: Tue, 26 Jul 2022 19:25:20 GMT From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: a8adf13a637d - main - Adjust function definition in nhop_ctl.c to avoid clang 15 warnings Message-ID: <202207261925.26QJPKHU019605@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=a8adf13a637d8c5af742220e6dac0561c6449126 commit a8adf13a637d8c5af742220e6dac0561c6449126 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-07-26 18:26:46 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-07-26 19:25:09 +0000 Adjust function definition in nhop_ctl.c to avoid clang 15 warnings With clang 15, the following -Werror warning is produced: sys/net/route/nhop_ctl.c:508:21: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] alloc_nhop_structure() ^ void This is alloc_nhop_structure() 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/net/route/nhop_ctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/route/nhop_ctl.c b/sys/net/route/nhop_ctl.c index 0e9a6b8a0a77..4bf7bfb1b416 100644 --- a/sys/net/route/nhop_ctl.c +++ b/sys/net/route/nhop_ctl.c @@ -505,7 +505,7 @@ nhop_create_from_nhop(struct rib_head *rnh, const struct nhop_object *nh_orig, * Returns pointer to nhop_priv or NULL. */ static struct nhop_priv * -alloc_nhop_structure() +alloc_nhop_structure(void) { struct nhop_object *nh; struct nhop_priv *nh_priv;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207261925.26QJPKHU019605>