From fea231d21b299535302b41ac2e841f8abf1787fc Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sun, 27 Nov 2022 13:23:28 -0700 Subject: [PATCH] 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