From 4f4acc3669c403ca6b0b9ba07fa6a5f51b4a63ec Mon Sep 17 00:00:00 2001 From: James Zhao Date: Wed, 30 Nov 2011 14:23:24 -0800 Subject: [PATCH] Fix compile error when _DEBUG_GDB_IO_ is set MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Compile error is encountered when _DEBUG_GDB_IO_ is set, due to duplicate variables. Fixed by renaming the variable. Change-Id: I729c06e317fdb899142c9ceaf543b7f580088807 Signed-off-by: James Zhao Reviewed-on: http://openocd.zylin.com/243 Tested-by: jenkins Reviewed-by: Øyvind Harboe --- src/server/gdb_server.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 4dd9bd10a..93aa8edc5 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -1076,10 +1076,10 @@ static int gdb_get_registers_packet(struct connection *connection, #ifdef _DEBUG_GDB_IO_ { - char *reg_packet_p; - reg_packet_p = strndup(reg_packet, reg_packet_size); - LOG_DEBUG("reg_packet: %s", reg_packet_p); - free(reg_packet_p); + char *reg_packet_p_debug; + reg_packet_p_debug = strndup(reg_packet, reg_packet_size); + LOG_DEBUG("reg_packet: %s", reg_packet_p_debug); + free(reg_packet_p_debug); } #endif