From 13e8e110264b88590a991ae30acee302a31437ba Mon Sep 17 00:00:00 2001 From: pancake Date: Tue, 26 Apr 2016 03:08:20 +0200 Subject: [PATCH] Fix warnings in udis86 --- shlr/udis86/syn.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/shlr/udis86/syn.c b/shlr/udis86/syn.c index 43022bf268..36ca0cb571 100644 --- a/shlr/udis86/syn.c +++ b/shlr/udis86/syn.c @@ -27,6 +27,7 @@ #include "decode.h" #include "syn.h" #include "udint.h" +#include /* * Register Table - Order Matters (types.h)! @@ -143,14 +144,14 @@ ud_syn_print_addr(struct ud *u, uint64_t addr) name = u->sym_resolver(u, addr, &offset); if (name) { if (offset) { - ud_asmprintf(u, "%s%+" FMT64 "d", name, offset); + ud_asmprintf(u, "%s%+" PRId64, name, offset); } else { ud_asmprintf(u, "%s", name); } return; } } - ud_asmprintf(u, "0x%" FMT64 "x", addr); + ud_asmprintf(u, "0x%" PRIx64, addr); } @@ -177,7 +178,7 @@ ud_syn_print_imm(struct ud* u, const struct ud_operand *op) default: UD_ASSERT(!"invalid offset"); v = 0; /* keep cc happy */ } } - ud_asmprintf(u, "0x%" FMT64 "x", v); + ud_asmprintf(u, "0x%" PRIx64, v); } @@ -195,7 +196,7 @@ ud_syn_print_mem_disp(struct ud* u, const struct ud_operand *op, int sign) case 64: v = op->lval.uqword; break; default: UD_ASSERT(!"invalid offset"); v = 0; /* keep cc happy */ } - ud_asmprintf(u, "0x%" FMT64 "x", v); + ud_asmprintf(u, "0x%" PRIx64, v); } else { int64_t v; UD_ASSERT(op->offset != 64); @@ -206,9 +207,9 @@ ud_syn_print_mem_disp(struct ud* u, const struct ud_operand *op, int sign) default: UD_ASSERT(!"invalid offset"); v = 0; /* keep cc happy */ } if (v < 0) { - ud_asmprintf(u, "-0x%" FMT64 "x", -v); + ud_asmprintf(u, "-0x%" PRIx64, -v); } else if (v > 0) { - ud_asmprintf(u, "%s0x%" FMT64 "x", sign? "+" : "", v); + ud_asmprintf(u, "%s0x%" PRIx64, sign? "+" : "", v); } } }