git: c7c3583e3d61 - stable/13 - Adjust function definition in nhop_ctl.c to avoid clang 15 warnings
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 29 Jul 2022 18:47:38 UTC
The branch stable/13 has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=c7c3583e3d61ae5425e3224826eca52234d90a16
commit c7c3583e3d61ae5425e3224826eca52234d90a16
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-26 18:26:46 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-29 18:30:00 +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
(cherry picked from commit a8adf13a637d8c5af742220e6dac0561c6449126)
---
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 16b8ca46739a..56d30405fc1e 100644
--- a/sys/net/route/nhop_ctl.c
+++ b/sys/net/route/nhop_ctl.c
@@ -502,7 +502,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;