aboutsummaryrefslogtreecommitdiff
path: root/src/rtos/rtos.c
diff options
context:
space:
mode:
authorPaul Fertser <fercerpav@gmail.com>2014-01-17 14:08:07 +0400
committerSpencer Oliver <spen@spen-soft.co.uk>2014-02-04 21:17:24 +0000
commit164c543799a6bda0c4a6011f43d825930b36c7fe (patch)
treee6754b289feeeaf6817fc3e8ecfb0e06b4486887 /src/rtos/rtos.c
parent47d4224d48199e700f7f685c7965a9864dde5f20 (diff)
downloadriscv-openocd-164c543799a6bda0c4a6011f43d825930b36c7fe.zip
riscv-openocd-164c543799a6bda0c4a6011f43d825930b36c7fe.tar.gz
riscv-openocd-164c543799a6bda0c4a6011f43d825930b36c7fe.tar.bz2
rtos: fix uninitialised variable warning
Breaks build with clang 3.3. This "addr" variable is actually always ignored by next_symbol() when cur_symbol is an empty string but clang can't (and probably shouldn't) prove that automatically. Change-Id: Id030f1aa34b9d40b5fa20a422031511520e52669 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/1876 Tested-by: jenkins Reviewed-by: Xiaofan <xiaofanc@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'src/rtos/rtos.c')
-rw-r--r--src/rtos/rtos.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rtos/rtos.c b/src/rtos/rtos.c
index 11cb792..cdd3760 100644
--- a/src/rtos/rtos.c
+++ b/src/rtos/rtos.c
@@ -189,7 +189,7 @@ static char *next_symbol(struct rtos *os, char *cur_symbol, uint64_t cur_addr)
int rtos_qsymbol(struct connection *connection, char *packet, int packet_size)
{
int rtos_detected = 0;
- uint64_t addr;
+ uint64_t addr = 0;
size_t reply_len;
char reply[GDB_BUFFER_SIZE], cur_sym[GDB_BUFFER_SIZE / 2] = "", *next_sym;
struct target *target = get_target_from_connection(connection);