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>
&& 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;
}
}