Skip to content

Commit

Permalink
linux/bfd: cast a function of an incompatible type via void*
Browse files Browse the repository at this point in the history
  • Loading branch information
robertswiecki committed Oct 4, 2023
1 parent 803476a commit 4c85173
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 -Wno-cast-function-type-strict
ARCH_CFLAGS += -Wno-gnu-statement-expression
ARCH_CFLAGS += -mllvm -inline-threshold=2000
CFLAGS_BLOCKS = -fblocks

Expand Down
3 changes: 1 addition & 2 deletions linux/bfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,7 @@ void arch_bfdDisasm(pid_t pid, uint8_t* mem, size_t size, char* instr) {
* argument will be discarded if needed.
*/

void (*idi_4_args)(void*, void*, void*, void*) =
(void (*)(void*, void*, void*, void*))init_disassemble_info;
void (*idi_4_args)(void*, void*, void*, void*) = (void*)init_disassemble_info;
idi_4_args(&info, instr, arch_bfdFPrintF, arch_bfdFPrintFStyled);
info.arch = bfd_get_arch(bfdh);
info.mach = bfd_get_mach(bfdh);
Expand Down

0 comments on commit 4c85173

Please sign in to comment.