git: 6f5f44562a72 - main - Adjust dtrace_unload() definition to avoid clang 15 warning
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 19 Jul 2022 19:13:50 UTC
The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=6f5f44562a72e739a39057a4661a56498e4c79b5 commit 6f5f44562a72e739a39057a4661a56498e4c79b5 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-07-19 18:48:47 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-07-19 18:48:47 +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 --- 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;