]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: frv: fix some printf type mismatch warnings
authorMike Frysinger <vapier@gentoo.org>
Sun, 27 Jun 2021 04:02:11 +0000 (00:02 -0400)
committerMike Frysinger <vapier@gentoo.org>
Mon, 28 Jun 2021 03:33:26 +0000 (23:33 -0400)
The %p usage was a real bug that would probably cause a crash.

sim/frv/ChangeLog
sim/frv/profile.c
sim/frv/sim-if.c

index 0877169b7f0ae61cebbdaf7995c699ca7d9fbb1f..cb4e2cfeaa1d67b1a630c90814d2b2f234b355ce 100644 (file)
@@ -1,3 +1,8 @@
+2021-06-27  Mike Frysinger  <vapier@gentoo.org>
+
+       * profile.c (wait_for_flush): Change %p to %x.
+       * sim-if.c (sim_open): Change %lx to %x.
+
 2021-06-27  Mike Frysinger  <vapier@gentoo.org>
 
        * traps.c (frv_break): Delete pc and pass down NULL_CIA.
index 94212bfa0f3de496cd4ba0dbc4c2a093a50a6259..89332e580402ec24b62b746ec80f6593c0598a77 100644 (file)
@@ -901,7 +901,7 @@ wait_for_flush (SIM_CPU *cpu)
     }
   if (TRACE_INSN_P (cpu) && wait)
     {
-      sprintf (hazard_name, "Data cache flush address %p:", address);
+      sprintf (hazard_name, "Data cache flush address %x:", address);
       frv_model_trace_wait_cycles (cpu, wait, hazard_name);
     }
 }
index 758e17a3fc5ae47c3a4b72c200ba5d23eb747a8e..3dd76ad7c9c2df742f1d68fdbc5063e438ec933e 100644 (file)
@@ -86,7 +86,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, bfd *abfd,
   /* Allocate core managed memory if none specified by user.
      Use address 4 here in case the user wanted address 0 unmapped.  */
   if (sim_core_read_buffer (sd, NULL, read_map, &c, 4, 1) == 0)
-    sim_do_commandf (sd, "memory region 0,0x%lx", FRV_DEFAULT_MEM_SIZE);
+    sim_do_commandf (sd, "memory region 0,0x%x", FRV_DEFAULT_MEM_SIZE);
 
   /* check for/establish the reference program image */
   if (sim_analyze_program (sd,