aboutsummaryrefslogtreecommitdiff
path: root/sim/common
diff options
context:
space:
mode:
Diffstat (limited to 'sim/common')
-rw-r--r--sim/common/ChangeLog6
-rw-r--r--sim/common/cgen-trace.c4
2 files changed, 10 insertions, 0 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 8472b2b..56c7dc6 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,5 +1,11 @@
2021-06-27 Mike Frysinger <vapier@gentoo.org>
+ * cgen-trace.c: Include diagnostics.h.
+ (cgen_trace_extract): Call DIAGNOSTIC_PUSH,
+ DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL, and DIAGNOSTIC_POP.
+
+2021-06-27 Mike Frysinger <vapier@gentoo.org>
+
* cgen-run.c (engine_run_n): Assert cpu arguments are valid.
2021-06-27 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/common/cgen-trace.c b/sim/common/cgen-trace.c
index 6592740..f5483fd 100644
--- a/sim/common/cgen-trace.c
+++ b/sim/common/cgen-trace.c
@@ -22,6 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <errno.h>
#include <stdlib.h>
+#include "diagnostics.h"
#include "dis-asm.h"
#include "bfd.h"
#include "sim-main.h"
@@ -211,7 +212,10 @@ cgen_trace_extract (SIM_CPU *cpu, IADDR pc, const char *name, ...)
{
case 'x' :
ival = va_arg (args, int);
+ DIAGNOSTIC_PUSH
+ DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
trace_printf (CPU_STATE (cpu), cpu, fmt, ival);
+ DIAGNOSTIC_POP
break;
default :
abort ();