From ad389c48f6dca9064b4a866dab7cafca6ad8b27f 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 clang --- Makefile | 2 +- linux/bfd.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b123b2b0e..9aa9b52b9 100644 --- a/Makefile +++ b/Makefile @@ -179,7 +179,7 @@ COMPILER = $(shell $(CC) -v 2>&1 | \ ifeq ($(COMPILER),clang) ARCH_CFLAGS += -Wno-initializer-overrides -Wno-unknown-warning-option ARCH_CFLAGS += -Wno-gnu-empty-initializer -Wno-format-pedantic - ARCH_CFLAGS += -Wno-gnu-statement-expression + ARCH_CFLAGS += -Wno-gnu-statement-expression -Wno-cast-function-type-strict ARCH_CFLAGS += -mllvm -inline-threshold=2000 CFLAGS_BLOCKS = -fblocks diff --git a/linux/bfd.c b/linux/bfd.c index 6ca550291..946dfecf1 100644 --- a/linux/bfd.c +++ b/linux/bfd.c @@ -252,6 +252,7 @@ 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. */ + void (*idi_4_args)(void*, void*, void*, void*) = (void (*)(void*, void*, void*, void*))init_disassemble_info; idi_4_args(&info, instr, arch_bfdFPrintF, arch_bfdFPrintFStyled);