From df32b446c3f54ed1cc9d4435740bffb42993090c Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 15 Jun 2021 00:40:17 -0400 Subject: [PATCH] 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. --- sim/mips/ChangeLog | 5 +++++ sim/mips/dv-tx3904sio.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog index 1e57fe54326..28a33c78995 100644 --- a/sim/mips/ChangeLog +++ b/sim/mips/ChangeLog @@ -1,3 +1,8 @@ +2021-06-16 Mike Frysinger + + * dv-tx3904sio.c (tx3904sio_fifo_push): Change next_buf to + unsigned_1. + 2021-06-16 Mike Frysinger * dv-tx3904irc.c (tx3904irc_io_write_buffer): Initialize diff --git a/sim/mips/dv-tx3904sio.c b/sim/mips/dv-tx3904sio.c index c81b2dd3a5e..d447014014c 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); -- 2.30.2