public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] sim: dv-cfi: fix printf format
@ 2021-04-24  4:19 Michael Frysinger
  0 siblings, 0 replies; only message in thread
From: Michael Frysinger @ 2021-04-24  4:19 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3886790f133ce1ee2f30ebf37bb7dec1f812f29a

commit 3886790f133ce1ee2f30ebf37bb7dec1f812f29a
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Sat Apr 24 00:16:08 2021 -0400

    sim: dv-cfi: fix printf format
    
    Use the existing PRI constants to select the right format rather than
    assume signed_cell is always %u.  Fixes building for riscv64.

Diff:
---
 sim/common/ChangeLog | 4 ++++
 sim/common/dv-cfi.c  | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index ed4d9f7da65..516e214f011 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-24  Mike Frysinger  <vapier@gentoo.org>
+
+	* dv-cfi.c (attach_cfi_regs): Change %u to PRIiTC.
+
 2021-04-24  Mike Frysinger  <vapier@gentoo.org>
 
 	* sim-options.c (ARG_HASH_SIZE): Increase to 256.
diff --git a/sim/common/dv-cfi.c b/sim/common/dv-cfi.c
index afc020a9f4b..b8652271752 100644
--- a/sim/common/dv-cfi.c
+++ b/sim/common/dv-cfi.c
@@ -610,7 +610,7 @@ attach_cfi_regs (struct hw *me, struct cfi *cfi)
     if (cfi_cmdsets[i]->id == ival)
       cfi->cmdset = cfi_cmdsets[i];
   if (cfi->cmdset == NULL)
-    hw_abort (me, "cmdset %u not supported", ival);
+    hw_abort (me, "cmdset %" PRIiTC " not supported", ival);
 
   if (ret == 2)
     {


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-24  4:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-24  4:19 [binutils-gdb] sim: dv-cfi: fix printf format Michael Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).