Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Aug 2022 13:51:41 GMT
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: ec666d187d0d - main - Adjust function definition in ofw to avoid clang 15 warning
Message-ID:  <202208111351.27BDpfTl048697@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=ec666d187d0dc44d105a95b5b25b47607236a051

commit ec666d187d0dc44d105a95b5b25b47607236a051
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2022-08-11 12:02:50 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2022-08-11 13:30:32 +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
---
 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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202208111351.27BDpfTl048697>