git: 8e9ca1379eda - main - Adjust function definition in subr_devmap.c to avoid clang 15 warning
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 11 Aug 2022 13:51:42 UTC
The branch main has been updated by andrew:
URL: https://cgit.FreeBSD.org/src/commit/?id=8e9ca1379edad98a957570a2339a9236910e61c1
commit 8e9ca1379edad98a957570a2339a9236910e61c1
Author: Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2022-08-11 12:04:58 +0000
Commit: Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2022-08-11 13:30:32 +0000
Adjust function definition in subr_devmap.c to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:
sys/kern/subr_devmap.c:87:19: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
devmap_print_table()
^
void
This is because devmap_print_table() and devmap_lastaddr() are declared
with a (void) argument list, but defined with an empty argument list.
Make the definition match the declaration.
Sponsored by: The FreeBSD Foundation
---
sys/kern/subr_devmap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/kern/subr_devmap.c b/sys/kern/subr_devmap.c
index 2ca765878f38..fed9adcb9adb 100644
--- a/sys/kern/subr_devmap.c
+++ b/sys/kern/subr_devmap.c
@@ -84,7 +84,7 @@ devmap_dump_table(int (*prfunc)(const char *, ...))
* Print the contents of the static mapping table. Used for bootverbose.
*/
void
-devmap_print_table()
+devmap_print_table(void)
{
devmap_dump_table(printf);
}
@@ -95,7 +95,7 @@ devmap_print_table()
* the first unusable byte of KVA.
*/
vm_offset_t
-devmap_lastaddr()
+devmap_lastaddr(void)
{
const struct devmap_entry *pd;
vm_offset_t lowaddr;