winedbg: Use unsigned int for offset/length in GDB qXfer handler.

packet_query uses sscanf format "%x" to parse out offset and length
values.  Since %x corresponds to unsigned int in the C standard, adjust
the variable types appropriately.

Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jinoh Kang 2021-11-19 22:41:12 +09:00 committed by Alexandre Julliard
parent d8c07c1391
commit a4b55c620c
1 changed files with 3 additions and 3 deletions

View File

@ -772,7 +772,7 @@ static void packet_reply_open_xfer(struct gdb_context* gdbctx)
packet_reply_add(gdbctx, "m");
}
static void packet_reply_close_xfer(struct gdb_context* gdbctx, int off, int len)
static void packet_reply_close_xfer(struct gdb_context* gdbctx, unsigned int off, unsigned int len)
{
int begin = gdbctx->out_curr_packet + 1;
int plen;
@ -789,7 +789,7 @@ static void packet_reply_close_xfer(struct gdb_context* gdbctx, int off, int len
}
plen = gdbctx->out_len - begin;
if (len >= 0 && plen > len) gdbctx->out_len -= (plen - len);
if (plen > len) gdbctx->out_len -= (plen - len);
else gdbctx->out_buf[gdbctx->out_curr_packet] = 'l';
packet_reply_close(gdbctx);
@ -1762,7 +1762,7 @@ static void packet_query_target_xml(struct gdb_context* gdbctx, struct backend_c
static enum packet_return packet_query(struct gdb_context* gdbctx)
{
int off, len;
unsigned int off, len;
struct backend_cpu *cpu;
switch (gdbctx->in_packet[0])