git: 54e5efb2643e - main - Adjust t4_tracer_mod{load,unload}() definitions to avoid clang 15 warnings
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 19 Jul 2022 19:13:42 UTC
The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=54e5efb2643ec5f4bf40fef2a1937cd5449a58a0 commit 54e5efb2643ec5f4bf40fef2a1937cd5449a58a0 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-07-19 18:20:21 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-07-19 18:37:02 +0000 Adjust t4_tracer_mod{load,unload}() definitions to avoid clang 15 warnings With clang 15, the following -Werror warnings are produced: sys/dev/cxgbe/t4_tracer.c:234:18: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] t4_tracer_modload() ^ void sys/dev/cxgbe/t4_tracer.c:243:20: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] t4_tracer_modunload() ^ void This is because t4_tracer_modload() and t4_tracer_modunload() are declared with a (void) argument list, but defined with an empty argument list. Make the definitions match the declarations. MFC after: 3 days --- sys/dev/cxgbe/t4_tracer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/cxgbe/t4_tracer.c b/sys/dev/cxgbe/t4_tracer.c index f6c85b15c75a..c4d6f9d48fbc 100644 --- a/sys/dev/cxgbe/t4_tracer.c +++ b/sys/dev/cxgbe/t4_tracer.c @@ -231,7 +231,7 @@ t4_cloner_destroy(struct if_clone *ifc, struct ifnet *ifp) } void -t4_tracer_modload() +t4_tracer_modload(void) { sx_init(&t4_trace_lock, "T4/T5 tracer lock"); @@ -240,7 +240,7 @@ t4_tracer_modload() } void -t4_tracer_modunload() +t4_tracer_modunload(void) { if (t4_cloner != NULL) {