From 3e0f34b198b1654f89fc96d04d4cfcb7b889c702 Mon Sep 17 00:00:00 2001 From: Paul Fertser Date: Fri, 17 Jan 2014 14:10:57 +0400 Subject: [PATCH] server/gdb_server: fix uninitialised variable warning Caught (breaks build) with clang 3.3. Change-Id: I5978fe34e82122f62e3d587bcdc45ad12f5e55ca Signed-off-by: Paul Fertser Reviewed-on: http://openocd.zylin.com/1877 Tested-by: jenkins Reviewed-by: Xiaofan Reviewed-by: Spencer Oliver --- src/server/gdb_server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 91016e42..ea821140 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -2205,6 +2205,7 @@ static int gdb_target_description_supported(struct target *target, int *supporte struct reg **reg_list = NULL; int reg_list_size = 0; int feature_list_size = 0; + char **features = NULL; retval = target_get_gdb_reg_list(target, ®_list, ®_list_size, REG_CLASS_ALL); @@ -2218,7 +2219,6 @@ static int gdb_target_description_supported(struct target *target, int *supporte goto error; } - char **features = NULL; /* Get a list of available target registers features */ retval = get_reg_features_list(target, &features, &feature_list_size, reg_list, reg_list_size); if (retval != ERROR_OK) { -- 2.39.5