sim: cgen: add printf attributes in a few more calls

This helps the compiler process calls to these functions and emit
warnings about mismatched format arguments.
This commit is contained in:
Mike Frysinger
2021-06-26 23:02:53 -04:00
parent ded82565c6
commit a7ffa88dc6
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2021-06-27 Mike Frysinger <vapier@gentoo.org>
* cgen-trace.h (cgen_trace_printf): Add ATTRIBUTE_PRINTF_2.
(sim_disasm_sprintf): Likewise.
2021-06-27 Mike Frysinger <vapier@gentoo.org>
* cgen-trace.c (cgen_trace_extract): Make name & fmt const.

View File

@ -26,7 +26,7 @@ void cgen_trace_insn (SIM_CPU *, const struct cgen_insn *,
const struct argbuf *, IADDR);
void cgen_trace_extract (SIM_CPU *, IADDR, const char *, ...);
void cgen_trace_result (SIM_CPU *, const char *, int, ...);
void cgen_trace_printf (SIM_CPU *, const char *fmt, ...);
void cgen_trace_printf (SIM_CPU *, const char *fmt, ...) ATTRIBUTE_PRINTF_2;
/* Trace instruction results. */
#define CGEN_TRACE_RESULT_P(cpu, abuf) \
@ -75,7 +75,7 @@ typedef struct {
} SFILE;
/* String printer for the disassembler. */
extern int sim_disasm_sprintf (SFILE *, const char *, ...);
extern int sim_disasm_sprintf (SFILE *, const char *, ...) ATTRIBUTE_PRINTF_2;
/* For opcodes based disassemblers. */
#ifdef __BFD_H_SEEN__