Skip to content

Commit

Permalink
gdbstub: Clear unused variables in gdb_handle_packet
Browse files Browse the repository at this point in the history
Signed-off-by: Jon Doron <arilou@gmail.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20190529064148.19856-20-arilou@gmail.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
  • Loading branch information
arilou authored and stsquad committed Jun 12, 2019
1 parent 7009d57 commit 3f1cbac
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions gdbstub.c
Expand Up @@ -2288,17 +2288,11 @@ static void handle_target_halt(GdbCmdContext *gdb_ctx, void *user_ctx)

static int gdb_handle_packet(GDBState *s, const char *line_buf)
{
const char *p;
int ch;
uint8_t mem_buf[MAX_PACKET_LENGTH];
char buf[sizeof(mem_buf) + 1 /* trailing NUL */];
const GdbCmdParseEntry *cmd_parser = NULL;

trace_gdbstub_io_command(line_buf);

p = line_buf;
ch = *p++;
switch(ch) {
switch (line_buf[0]) {
case '!':
put_packet(s, "OK");
break;
Expand Down Expand Up @@ -2515,8 +2509,7 @@ static int gdb_handle_packet(GDBState *s, const char *line_buf)
break;
default:
/* put empty packet */
buf[0] = '\0';
put_packet(s, buf);
put_packet(s, "");
break;
}

Expand Down

0 comments on commit 3f1cbac

Please sign in to comment.