Index: common/ChangeLog
authorAndrew Cagney <cagney@redhat.com>
Thu, 28 Aug 2003 17:02:00 +0000 (17:02 +0000)
committerAndrew Cagney <cagney@redhat.com>
Thu, 28 Aug 2003 17:02:00 +0000 (17:02 +0000)
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.

sim/common/ChangeLog
sim/common/dv-glue.c
sim/common/sim-options.c
sim/mn10300/ChangeLog
sim/mn10300/dv-mn103ser.c
sim/mn10300/dv-mn103tim.c

index c7172f9d152536febcd93610c534f7aad9ddacda..3d012d74d3b3ff46461b28cef55e415948a6a9ba 100644 (file)
@@ -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).
index 560fd7051eae235b1f014ecc2e659c47e77d8dc0..ab04fe737b29e100d80f6b1f0cf3c78acf75a27c 100644 (file)
@@ -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);
index 8c16d56cc7548acf5eb107e3ac2f2e03f75709c5..df12a639b8aabb4b1678be4a9bc8b6dd5947d18a 100644 (file)
@@ -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++;
index 9a5b6023ade608b52527cbd73cad407777b92f71..5602ce8fe958a1a2b9db6f13209d26f3c26908b2 100644 (file)
@@ -1,3 +1,12 @@
+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.
+
 2003-02-27  Andrew Cagney  <cagney@redhat.com>
 
        * interp.c (sim_open, sim_create_inferior, sim_open)
index 7f20ed1f6b2195f09f32f3bd4ecc0666522f3693..bba20c9d920909cad42d313b431d64dbe49291c5 100644 (file)
@@ -240,7 +240,7 @@ do_polling_event (struct hw *me,
                  void *data)
 {
   struct mn103ser *serial = hw_data(me);
-  int serial_reg = (int) data;
+  long serial_reg = (long) data;
   char c;
   int count;
 
@@ -421,7 +421,7 @@ read_status_reg (struct hw *me,
       serial->device[serial_reg].event
        = hw_event_queue_schedule (me, 1000,
                                   do_polling_event,
-                                  (void *)serial_reg);
+                                  (void *) (long) serial_reg);
     }
 
   if ( nr_bytes == 1 )
index 9b1e0d2e7ee37704c71f0c00321b77a5ee8cb415..a6272d8bc3a30139269962b488e60a910786a8b5 100644 (file)
@@ -568,7 +568,7 @@ do_counter_event (struct hw *me,
                  void *data)
 {
   struct mn103tim *timers = hw_data(me);
-  int timer_nr = (int) data;
+  long timer_nr = (long) data;
   int next_timer;
 
   /* Check if counting is still enabled. */
@@ -609,7 +609,7 @@ do_counter6_event (struct hw *me,
                  void *data)
 {
   struct mn103tim *timers = hw_data(me);
-  int timer_nr = (int) data;
+  long timer_nr = (long) data;
   int next_timer;
 
   /* Check if counting is still enabled. */
@@ -705,7 +705,7 @@ write_base_reg (struct hw *me,
 static void
 write_mode_reg (struct hw *me,
                struct mn103tim *timers,
-               int timer_nr,
+               long timer_nr,
                const void *source,
                unsigned nr_bytes)
      /* for timers 0 to 5 */
@@ -716,7 +716,8 @@ write_mode_reg (struct hw *me,
 
   if ( nr_bytes != 1 )
     {
-      hw_abort (me, "bad write size of %d bytes to TM%dMD.", nr_bytes, timer_nr);
+      hw_abort (me, "bad write size of %d bytes to TM%ldMD.", nr_bytes,
+               timer_nr);
     }
 
   mode_val = *(unsigned8 *)source;
@@ -742,7 +743,7 @@ write_mode_reg (struct hw *me,
        {
          if ( timer_nr == 0 || timer_nr == 4 )
            {
-             hw_abort(me, "Timer %d cannot be cascaded.", timer_nr);
+             hw_abort(me, "Timer %ld cannot be cascaded.", timer_nr);
            }
        }
       else
@@ -839,7 +840,7 @@ write_tm6md (struct hw *me,
 {
   unsigned8 mode_val0 = 0x00, mode_val1 = 0x00;
   unsigned32 div_ratio;
-  int timer_nr = 6;
+  long timer_nr = 6;
 
   unsigned_word offset = address - timers->block[0].base;
   
This page took 0.035204 seconds and 4 git commands to generate.