From ec17dba8be52092ccd23dcc9a8e9f27bc85c2c36 Mon Sep 17 00:00:00 2001 From: Robert Swiecki Date: Mon, 2 Oct 2023 20:22:58 +0200 Subject: [PATCH] linux/bfd: allow un-strict function conversion with vlang --- linux/bfd.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/linux/bfd.c b/linux/bfd.c index 6ca550291..ea1789ef6 100644 --- a/linux/bfd.c +++ b/linux/bfd.c @@ -252,8 +252,16 @@ void arch_bfdDisasm(pid_t pid, uint8_t* mem, size_t size, char* instr) { * of 3. Add the 4th argument in all cases. Hopefully it'll work will all ABIs, and the 4th * argument will be discarded if needed. */ + +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wcast-function-type-strict" +#endif /* __clang__ */ void (*idi_4_args)(void*, void*, void*, void*) = (void (*)(void*, void*, void*, void*))init_disassemble_info; +#ifdef __clang__ +#pragma clang diagnostic pop +#endif /* __clang__ */ idi_4_args(&info, instr, arch_bfdFPrintF, arch_bfdFPrintFStyled); info.arch = bfd_get_arch(bfdh); info.mach = bfd_get_mach(bfdh);