Skip to content

Commit

Permalink
linux/bfd: allow un-strict function conversion with vlang
Browse files Browse the repository at this point in the history
  • Loading branch information
robertswiecki committed Oct 2, 2023
1 parent c0522ed commit ec17dba
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions linux/bfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ec17dba

Please sign in to comment.