From eebcb0fff60a400fcc035d53c172a15a4af15722 Mon Sep 17 00:00:00 2001 From: Brendan Long Date: Tue, 4 Jun 2013 16:52:38 -0600 Subject: [PATCH] Make the format string in ud_asmprintf a const char* since we pass it literals. --- libudis86/syn.c | 2 +- libudis86/syn.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libudis86/syn.c b/libudis86/syn.c index 2ccf4b5..cf90810 100644 --- a/libudis86/syn.c +++ b/libudis86/syn.c @@ -104,7 +104,7 @@ ud_syn_rel_target(struct ud *u, struct ud_operand *opr) * returns a negative number and truncates the output. */ int -ud_asmprintf(struct ud *u, char *fmt, ...) +ud_asmprintf(struct ud *u, const char *fmt, ...) { int ret; int avail; diff --git a/libudis86/syn.h b/libudis86/syn.h index 3e4933e..d3b1e3f 100644 --- a/libudis86/syn.h +++ b/libudis86/syn.h @@ -36,10 +36,10 @@ extern const char* ud_reg_tab[]; uint64_t ud_syn_rel_target(struct ud*, struct ud_operand*); #ifdef __GNUC__ -int ud_asmprintf(struct ud *u, char *fmt, ...) +int ud_asmprintf(struct ud *u, const char *fmt, ...) __attribute__ ((format (printf, 2, 3))); #else -int ud_asmprintf(struct ud *u, char *fmt, ...); +int ud_asmprintf(struct ud *u, const char *fmt, ...); #endif void ud_syn_print_addr(struct ud *u, uint64_t addr);