aboutsummaryrefslogtreecommitdiff
path: root/sim/common
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-08-28 17:02:00 +0000
committerAndrew Cagney <cagney@redhat.com>2003-08-28 17:02:00 +0000
commite158f0a010490f7fc3363dc45b7045fd0277331d (patch)
tree9eb3151344923ef9fa23d181d1157454cf4f9194 /sim/common
parente94cc8fa71f933ee86093243e3a37712aa8f41f5 (diff)
downloadgdb-e158f0a010490f7fc3363dc45b7045fd0277331d.zip
gdb-e158f0a010490f7fc3363dc45b7045fd0277331d.tar.gz
gdb-e158f0a010490f7fc3363dc45b7045fd0277331d.tar.bz2
Index: common/ChangeLog
2003-08-28 Andrew Cagney <cagney@redhat.com> * dv-glue.c (hw_glue_finish): Change %d to %ld to match sizeof. * sim-options.c (print_help): Cast the format with specifier to "int". Index: mn10300/ChangeLog 2003-08-28 Andrew Cagney <cagney@redhat.com> * dv-mn103ser.c (do_polling_event): Change type of "serial_reg" to "long". (read_status_reg): Cast "serial_reg" to "long". * dv-mn103tim.c (do_counter_event): Change type of "timer_nr" to "long". (do_counter6_event, write_mode_reg, write_tm6md): Ditto.
Diffstat (limited to 'sim/common')
-rw-r--r--sim/common/ChangeLog6
-rw-r--r--sim/common/dv-glue.c4
-rw-r--r--sim/common/sim-options.c5
3 files changed, 12 insertions, 3 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index c7172f9..3d012d7 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,9 @@
+2003-08-28 Andrew Cagney <cagney@redhat.com>
+
+ * dv-glue.c (hw_glue_finish): Change %d to %ld to match sizeof.
+ * sim-options.c (print_help): Cast the format with specifier to
+ "int".
+
2003-06-23 Michael Snyder <msnyder@redhat.com>
* nrun.c (main): Delete h8/300 ifdef (sim now handles signals).
diff --git a/sim/common/dv-glue.c b/sim/common/dv-glue.c
index 560fd70..ab04fe7 100644
--- a/sim/common/dv-glue.c
+++ b/sim/common/dv-glue.c
@@ -221,7 +221,7 @@ hw_glue_finish (struct hw *me)
if (glue->sizeof_output == 0)
hw_abort (me, "at least one reg property size must be nonzero");
if (glue->sizeof_output % sizeof (unsigned_word) != 0)
- hw_abort (me, "reg property size must be %d aligned",
+ hw_abort (me, "reg property size must be %ld aligned",
sizeof (unsigned_word));
/* and the address */
hw_unit_address_to_attach_address (hw_parent (me),
@@ -230,7 +230,7 @@ hw_glue_finish (struct hw *me)
&glue->address,
me);
if (glue->address % (sizeof (unsigned_word) * max_nr_ports) != 0)
- hw_abort (me, "reg property address must be %d aligned",
+ hw_abort (me, "reg property address must be %ld aligned",
sizeof (unsigned_word) * max_nr_ports);
glue->nr_outputs = glue->sizeof_output / sizeof (unsigned_word);
glue->output = hw_zalloc (me, glue->sizeof_output);
diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c
index 8c16d56..df12a63 100644
--- a/sim/common/sim-options.c
+++ b/sim/common/sim-options.c
@@ -769,7 +769,10 @@ print_help (SIM_DESC sd, sim_cpu *cpu, const struct option_list *ol, int is_comm
end --;
if (end == chp)
end = chp + doc_width - 1;
- sim_io_printf (sd, "%.*s\n%*s", end - chp, chp, indent, "");
+ /* The cast should be ok - its distances between to
+ points in a string. */
+ sim_io_printf (sd, "%.*s\n%*s", (int) (end - chp), chp, indent,
+ "");
chp = end;
while (isspace (*chp) && *chp != '\0')
chp++;