]> git.sur5r.net Git - openocd/commitdiff
server/gdb_server: fix uninitialised variable warning
authorPaul Fertser <fercerpav@gmail.com>
Fri, 17 Jan 2014 10:10:57 +0000 (14:10 +0400)
committerSpencer Oliver <spen@spen-soft.co.uk>
Tue, 4 Feb 2014 21:18:24 +0000 (21:18 +0000)
Caught (breaks build) with clang 3.3.

Change-Id: I5978fe34e82122f62e3d587bcdc45ad12f5e55ca
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1877
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
src/server/gdb_server.c

index 91016e42435d390b673bf9a465c0e42017cb0cb0..ea82114081dd1d6bd3f714fab77966bcd6d9712a 100644 (file)
@@ -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, &reg_list,
                        &reg_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) {