git: fea231d21b29 - main - ofw: Cast function pointer to proper type

From: Warner Losh <imp_at_FreeBSD.org>
Date: Sun, 27 Nov 2022 20:35:34 UTC
The branch main has been updated by imp:

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

commit fea231d21b299535302b41ac2e841f8abf1787fc
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2022-11-27 20:23:28 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2022-11-27 20:23:28 +0000

    ofw: Cast function pointer to proper type
    
    clang 15 insists that we call entry() via a function prototype. Rather
    than copping out and using (...), cast it to the same prototype that's
    used elsewhere (with tweaks to pointers to make them fit into that
    prototype). No functional change.
    
    Sponsored by:           Netflix
---
 stand/libofw/openfirm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/stand/libofw/openfirm.c b/stand/libofw/openfirm.c
index b2b89581ae70..b780a9e36125 100644
--- a/stand/libofw/openfirm.c
+++ b/stand/libofw/openfirm.c
@@ -772,6 +772,7 @@ OF_chain(void *virt, u_int size, void (*entry)(), void *arg, u_int len)
 	if (size > 0)
 		OF_release(virt, size);
 #endif
-	entry(0, 0, openfirmware, arg, len);
+	((int (*)(u_long, u_long, u_long, void *, u_long))entry)
+	    (0, 0, (u_long)openfirmware, arg, len);
 }
 #endif