sim: m68hc11: tweak types to fix warnings
authorMike Frysinger <vapier@gentoo.org>
Sun, 2 May 2021 02:37:49 +0000 (22:37 -0400)
committerMike Frysinger <vapier@gentoo.org>
Wed, 5 May 2021 02:06:23 +0000 (22:06 -0400)
The hw attach API wants unsigned addresses.
The write API wants signed chars.

sim/m68hc11/ChangeLog
sim/m68hc11/dv-m68hc11.c
sim/m68hc11/dv-m68hc11sio.c

index 77283424c89ea9779608e8ed0ab9eeaa619b5764..6fd984dfa995e1b18212a3f6ba362f259b29df2e 100644 (file)
@@ -1,3 +1,8 @@
+2021-05-04  Mike Frysinger  <vapier@gentoo.org>
+
+       * dv-m68hc11.c (struct m68hc11cpu): Change attach_size to unsigned int.
+       * dv-m68hc11sio.c (m68hc11sio_tx_poll): Cast buffer to const char*.
+
 2021-05-04  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 3ec524a8e07d28f8939104aeaca63b8a48b2d547..f4815883a3390ab47fca8307afb2e147ff3fd642 100644 (file)
@@ -142,7 +142,7 @@ struct m68hc11cpu {
   int              pending_level;
   struct hw_event  *event;
   unsigned_word    attach_address;
-  int              attach_size;
+  unsigned int     attach_size;
   int              attach_space;
   int              last_oscillator;
   struct input_osc oscillators[NR_OSC];
index a5ee9a9d68a436f195059313fccf234d160b16b1..b6eacb4883e74a572ca1270e16251e3876e43c7b 100644 (file)
@@ -340,7 +340,7 @@ m68hc11sio_tx_poll (struct hw *me, void *data)
           break;
 
         case sio_stdio:
-          sim_io_write_stdout (sd, &controller->tx_char, 1);
+          sim_io_write_stdout (sd, (const char *)&controller->tx_char, 1);
           sim_io_flush_stdout (sd);
           break;