aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-06-15 00:40:17 -0400
committerMike Frysinger <vapier@gentoo.org>2021-06-16 01:53:09 -0400
commitdf32b446c3f54ed1cc9d4435740bffb42993090c (patch)
tree6168527fd1dae3b02a6b8f12a9dc92c7b7fe92b6
parent7b2298cbd812320c7f78d41d556ecb174cfdd675 (diff)
downloadgdb-df32b446c3f54ed1cc9d4435740bffb42993090c.zip
gdb-df32b446c3f54ed1cc9d4435740bffb42993090c.tar.gz
gdb-df32b446c3f54ed1cc9d4435740bffb42993090c.tar.bz2
sim: mips: tweak buffer sign
This model uses unsigned char buffers, but this temporary pointer is declared as signed. Switch it to unsigned since it's just a temporary variable to hold the new pointer.
-rw-r--r--sim/mips/ChangeLog5
-rw-r--r--sim/mips/dv-tx3904sio.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog
index 1e57fe5..28a33c7 100644
--- a/sim/mips/ChangeLog
+++ b/sim/mips/ChangeLog
@@ -1,5 +1,10 @@
2021-06-16 Mike Frysinger <vapier@gentoo.org>
+ * dv-tx3904sio.c (tx3904sio_fifo_push): Change next_buf to
+ unsigned_1.
+
+2021-06-16 Mike Frysinger <vapier@gentoo.org>
+
* dv-tx3904irc.c (tx3904irc_io_write_buffer): Initialize
register_value to 0.
diff --git a/sim/mips/dv-tx3904sio.c b/sim/mips/dv-tx3904sio.c
index c81b2dd..d447014 100644
--- a/sim/mips/dv-tx3904sio.c
+++ b/sim/mips/dv-tx3904sio.c
@@ -582,7 +582,7 @@ tx3904sio_fifo_push(struct hw* me, struct tx3904sio_fifo* fifo, char it)
if(fifo->size == fifo->used) /* full */
{
int next_size = fifo->size * 2 + 16;
- char* next_buf = zalloc(next_size);
+ unsigned_1* next_buf = zalloc(next_size);
memcpy(next_buf, fifo->buffer, fifo->used);
if(fifo->buffer != NULL) free(fifo->buffer);