git: 36e31c79cea1 - stable/13 - Adjust function definition in ofw to avoid clang 15 warning
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 22 Aug 2022 09:12:17 UTC
The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=36e31c79cea1684198706b9222ebe78346f39b2b commit 36e31c79cea1684198706b9222ebe78346f39b2b Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2022-08-11 12:02:50 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2022-08-22 09:11:29 +0000 Adjust function definition in ofw to avoid clang 15 warning With clang 15, the following -Werror warning is produced: sys/dev/ofw/openfirm.c:826:9: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] OF_enter() ^ void This is because OF_enter() and OF_exit 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 (cherry picked from commit ec666d187d0dc44d105a95b5b25b47607236a051) --- sys/dev/ofw/openfirm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ofw/openfirm.c b/sys/dev/ofw/openfirm.c index 56754eede8d0..788a76d17a47 100644 --- a/sys/dev/ofw/openfirm.c +++ b/sys/dev/ofw/openfirm.c @@ -823,7 +823,7 @@ OF_release(void *virt, size_t size) /* Suspend and drop back to the Open Firmware interface. */ void -OF_enter() +OF_enter(void) { if (ofw_def_impl == NULL) @@ -834,7 +834,7 @@ OF_enter() /* Shut down and drop back to the Open Firmware interface. */ void -OF_exit() +OF_exit(void) { if (ofw_def_impl == NULL)