git: 9a979788832e - main - Adjust prototype_unload() definition to avoid clang 15 warning
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 20 Jul 2022 16:50:54 UTC
The branch main has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=9a979788832e1c31d58923e4c780a6c4b05335d0
commit 9a979788832e1c31d58923e4c780a6c4b05335d0
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-19 20:10:03 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-20 15:13:49 +0000
Adjust prototype_unload() definition to avoid clang 15 warning
With clang 15, the following -Werror warnings is produced:
sys/cddl/dev/prototype.c:99:17: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
prototype_unload()
^
void
This is because prototype_unload() 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/cddl/dev/prototype.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/cddl/dev/prototype.c b/sys/cddl/dev/prototype.c
index bcbb3d202b27..203d910f5e00 100644
--- a/sys/cddl/dev/prototype.c
+++ b/sys/cddl/dev/prototype.c
@@ -96,7 +96,7 @@ prototype_load(void *dummy)
static int
-prototype_unload()
+prototype_unload(void)
{
int error = 0;