diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-05-01 22:05:25 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-05-08 12:27:45 -0400 |
commit | 6ae9091ab051a64a50678190a9c8f4d92b70933a (patch) | |
tree | 74f0588d3a09cd74d0789caaaca19f930d193eb4 /sim | |
parent | aac7ce3c8771f8db2fd0492a17fa45e85d449174 (diff) | |
download | fsf-binutils-gdb-6ae9091ab051a64a50678190a9c8f4d92b70933a.zip fsf-binutils-gdb-6ae9091ab051a64a50678190a9c8f4d92b70933a.tar.gz fsf-binutils-gdb-6ae9091ab051a64a50678190a9c8f4d92b70933a.tar.bz2 |
sim: cgen: tweak cgen_rtx_error to fix warnings
The function was missing a prototype, and passing a constant string
as the format string instead of going through a %s format.
Diffstat (limited to 'sim')
-rw-r--r-- | sim/common/ChangeLog | 5 | ||||
-rw-r--r-- | sim/common/cgen-ops.h | 2 | ||||
-rw-r--r-- | sim/common/cgen-utils.c | 2 |
3 files changed, 8 insertions, 1 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 0795a70..a3f6f38 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,5 +1,10 @@ 2021-05-08 Mike Frysinger <vapier@gentoo.org> + * cgen-ops.h (cgen_rtx_error): Declare. + * cgen-utils.c (cgen_rtx_error): Add %s printf argument. + +2021-05-08 Mike Frysinger <vapier@gentoo.org> + * cgen-utils.c (virtual_insn_entries): Change {0} to {}. 2021-05-08 Mike Frysinger <vapier@gentoo.org> diff --git a/sim/common/cgen-ops.h b/sim/common/cgen-ops.h index 329d7de..86a4835 100644 --- a/sim/common/cgen-ops.h +++ b/sim/common/cgen-ops.h @@ -708,4 +708,6 @@ BI SUBOFDI (DI a, DI b, BI c); #endif +extern void cgen_rtx_error (SIM_CPU *, const char *); + #endif /* CGEN_SEM_OPS_H */ diff --git a/sim/common/cgen-utils.c b/sim/common/cgen-utils.c index a22caab..a430427 100644 --- a/sim/common/cgen-utils.c +++ b/sim/common/cgen-utils.c @@ -416,7 +416,7 @@ cgen_rtx_error (SIM_CPU *cpu, const char * msg) { SIM_DESC sd = CPU_STATE (cpu); - sim_io_printf (sd, msg); + sim_io_printf (sd, "%s", msg); sim_io_printf (sd, "\n"); sim_engine_halt (sd, cpu, NULL, CPU_PC_GET (cpu), sim_stopped, SIM_SIGTRAP); |