git: b54e962acaf9 - main - Adjust function definition in subr_bus.c to avoid clang 15 warnings
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 26 Jul 2022 18:00:39 UTC
The branch main has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=b54e962acaf9bd349730d609c460951794e93304
commit b54e962acaf9bd349730d609c460951794e93304
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-26 16:01:16 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-26 17:59:57 +0000
Adjust function definition in subr_bus.c to avoid clang 15 warnings
With clang 15, the following -Werror warning is produced:
sys/kern/subr_bus.c:871:16: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
bus_topo_assert()
^
void
This is because bus_topo_assert() 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/kern/subr_bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
index 78faa3a542eb..1f8b03d2697c 100644
--- a/sys/kern/subr_bus.c
+++ b/sys/kern/subr_bus.c
@@ -868,7 +868,7 @@ static kobj_method_t null_methods[] = {
DEFINE_CLASS(null, null_methods, 0);
void
-bus_topo_assert()
+bus_topo_assert(void)
{
GIANT_REQUIRED;