[PATCH v2 1/7] sim: Add ATTRIBUTE_PRINTF

Tsukasa OI via Gdb-patches
2022-10-06T06:37:08Z

This commit adds ATTRIBUTE_PRINTF to a printf-like function.
---
sim/common/sim-utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sim/common/sim-utils.c b/sim/common/sim-utils.c
index 259b14cce29..f079bb3f330 100644
--- a/sim/common/sim-utils.c
+++ b/sim/common/sim-utils.c
@@ -146,7 +146,7 @@ sim_cpu_msg_prefix (sim_cpu *cpu)

/* Cover fn to sim_io_eprintf. */

-void
+void ATTRIBUTE_PRINTF (2, 3)
sim_io_eprintf_cpu (sim_cpu *cpu, const char *fmt, ...)
{
SIM_DESC sd = CPU_STATE (cpu);
--
2.34.1