summaryrefslogtreecommitdiff
path: root/sim/rx
diff options
context:
space:
mode:
authorSergei Trofimovich <siarheit@google.com>2022-05-21 08:53:50 +0100
committerSergei Trofimovich <siarheit@google.com>2022-06-15 23:12:56 +0100
commit33b90f59f3465041a620ad4f6504a35b578cfc65 (patch)
treecf1aaa6ae6c7eb4a14641e251e58fc04a8463803 /sim/rx
parent9d741cbedb8a7a77bb7c99bbbc363d5af4ba62c2 (diff)
downloadbinutils-gdb-33b90f59f3465041a620ad4f6504a35b578cfc65.tar.gz
sim: fix BFD_VMA format arguments on 32-bit hosts [PR gdb/29184]
Noticed format mismatch when attempted to build gdb on i686-linux-gnu in --enable-64-bit-bfd mode: sim/../../sim/cris/sim-if.c:576:28: error: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'bfd_size_type' {aka 'long long unsigned int'} [-Werror=format=] 576 | sim_do_commandf (sd, "memory region 0x%" BFD_VMA_FMT "x,0x%lx", | ^~~~~~~~~~~~~~~~~~~ 577 | interp_load_addr, interpsiz); | ~~~~~~~~~ | | | bfd_size_type {aka long long unsigned int} While at it fixed format string for time-related types.
Diffstat (limited to 'sim/rx')
-rw-r--r--sim/rx/syscalls.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sim/rx/syscalls.c b/sim/rx/syscalls.c
index 285d4573da1..35ba7d9000b 100644
--- a/sim/rx/syscalls.c
+++ b/sim/rx/syscalls.c
@@ -270,8 +270,8 @@ rx_syscall (int id)
rv = gettimeofday (&tv, 0);
if (trace)
- printf ("gettimeofday: %ld sec %ld usec to 0x%x\n", tv.tv_sec,
- tv.tv_usec, tvaddr);
+ printf ("gettimeofday: %" PRId64 " sec %" PRId64 " usec to 0x%x\n",
+ (int64_t)tv.tv_sec, (int64_t)tv.tv_usec, tvaddr);
mem_put_si (tvaddr, tv.tv_sec);
mem_put_si (tvaddr + 4, tv.tv_usec);
put_reg (1, rv);