git: 9729067ef8ae - stable/12 - Adjust dtrace_unload() definition to avoid clang 15 warning
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 23 Jul 2022 08:58:52 UTC
The branch stable/12 has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=9729067ef8ae8da5389f0e7b579f775f79c1267c
commit 9729067ef8ae8da5389f0e7b579f775f79c1267c
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-19 18:48:47 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-23 08:57:41 +0000
Adjust dtrace_unload() definition to avoid clang 15 warning
With clang 15, the following -Werror warnings is produced:
In file included from sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c:18440:
sys/cddl/dev/dtrace/dtrace_unload.c:26:14: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
dtrace_unload()
^
void
This is because dtrace_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
(cherry picked from commit 6f5f44562a72e739a39057a4661a56498e4c79b5)
---
sys/cddl/dev/dtrace/dtrace_unload.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/cddl/dev/dtrace/dtrace_unload.c b/sys/cddl/dev/dtrace/dtrace_unload.c
index b0d22e6527f3..1dfaa774e99f 100644
--- a/sys/cddl/dev/dtrace/dtrace_unload.c
+++ b/sys/cddl/dev/dtrace/dtrace_unload.c
@@ -23,7 +23,7 @@
*/
static int
-dtrace_unload()
+dtrace_unload(void)
{
dtrace_state_t *state;
int error = 0;