aboutsummaryrefslogtreecommitdiff
path: root/libobjc/sendmsg.c
diff options
context:
space:
mode:
authorAndrew Pinski <quic_apinski@quicinc.com>2024-08-31 11:57:32 -0700
committerAndrew Pinski <quic_apinski@quicinc.com>2024-08-31 12:04:22 -0700
commit2ac27bd50388d90a430357ce2d36f306cbe10128 (patch)
treef7376a9951fbdc05f3655ab44da23cd6be691263 /libobjc/sendmsg.c
parentdf89afbb7732bdf9f003af0020a46b6deb3c4eeb (diff)
downloadgcc-2ac27bd50388d90a430357ce2d36f306cbe10128.zip
gcc-2ac27bd50388d90a430357ce2d36f306cbe10128.tar.gz
gcc-2ac27bd50388d90a430357ce2d36f306cbe10128.tar.bz2
libobjc: Add cast to void* to disable warning for casting between incompatible function types [PR89586]
Even though __objc_get_forward_imp returns an IMP type, it will be casted to a compatable function type before calling it. So we adding a cast to `void*` will disable warning about the incompatible type. Pushed after bootstrap/test on x86_64. libobjc/ChangeLog: PR libobjc/89586 * sendmsg.c (__objc_get_forward_imp): Add cast to `void*` before casting to IMP. Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'libobjc/sendmsg.c')
-rw-r--r--libobjc/sendmsg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libobjc/sendmsg.c b/libobjc/sendmsg.c
index e781b2a9..65bc250 100644
--- a/libobjc/sendmsg.c
+++ b/libobjc/sendmsg.c
@@ -126,11 +126,11 @@ __objc_get_forward_imp (id rcv, SEL sel)
&& objc_sizeof_type (t) > OBJC_MAX_STRUCT_BY_VALUE
#endif
)
- return (IMP)__objc_block_forward;
+ return (IMP)(void*)__objc_block_forward;
else if (t && (*t == 'f' || *t == 'd'))
- return (IMP)__objc_double_forward;
+ return (IMP)(void*)__objc_double_forward;
else
- return (IMP)__objc_word_forward;
+ return (IMP)(void*)__objc_word_forward;
}
}