[4/6] sim: mips: tweak buffer sign

Message ID 20210615051141.4801-4-vapier@gentoo.org
State New
Headers show
Series
  • [1/6] sim: mips: fix format warnings when setting up memory
Related show

Commit Message

Luis Machado via Gdb-patches June 15, 2021, 5:11 a.m.
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/dv-tx3904sio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.31.1

Patch

diff --git a/sim/mips/dv-tx3904sio.c b/sim/mips/dv-tx3904sio.c
index c81b2dd3a5e7..d447014014cc 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);