This is an automated email from Gerrit.

Chris Anderson ([email protected]) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/1799

-- gerrit

commit ea3de418013f129081a5efadd1b773e78583091c
Author: Chris Anderson <[email protected]>
Date:   Mon Nov 4 23:44:03 2013 -0800

    Fix warnings caught by clang
    
    Change-Id: I73396b5c81fe4a7b53e3389511462a15a10ed398
    Signed-off-by: Chris Anderson <[email protected]>

diff --git a/src/flash/nor/mdr.c b/src/flash/nor/mdr.c
index 3ecee1c..bb1e2be 100644
--- a/src/flash/nor/mdr.c
+++ b/src/flash/nor/mdr.c
@@ -137,7 +137,7 @@ static int mdr_erase(struct flash_bank *bank, int first, 
int last)
        struct mdr_flash_bank *mdr_info = bank->driver_priv;
        int i, retval, retval2;
        unsigned int j;
-       uint32_t flash_cmd, cur_per_clock;
+       uint32_t flash_cmd = 0, cur_per_clock = 0;
 
        if (bank->target->state != TARGET_HALTED) {
                LOG_ERROR("Target not halted");
@@ -348,8 +348,8 @@ static int mdr_write(struct flash_bank *bank, uint8_t 
*buffer,
                        buffer[count++] = 0xff;
        }
 
-       uint32_t flash_cmd, cur_per_clock;
-       int retval, retval2;
+       uint32_t flash_cmd = 0, cur_per_clock = 0;
+       int retval = ERROR_OK, retval2 = ERROR_OK;
 
        retval = target_read_u32(target, MD_PER_CLOCK, &cur_per_clock);
        if (retval != ERROR_OK)
diff --git a/src/flash/nor/stm32f1x.c b/src/flash/nor/stm32f1x.c
index af7d9ea..8ad402f 100644
--- a/src/flash/nor/stm32f1x.c
+++ b/src/flash/nor/stm32f1x.c
@@ -1350,9 +1350,9 @@ COMMAND_HANDLER(stm32x_handle_options_read_command)
        }
 
        command_print(CMD_CTX, "User Option0: 0x%02" PRIx8,
-                       (user_data >> stm32x_info->user_data_offset) & 0xff);
+                       (uint8_t)((user_data >> stm32x_info->user_data_offset) 
& 0xff));
        command_print(CMD_CTX, "User Option1: 0x%02" PRIx8,
-                       (user_data >> (stm32x_info->user_data_offset + 8)) & 
0xff);
+                       (uint8_t)((user_data >> (stm32x_info->user_data_offset 
+ 8)) & 0xff));
 
        return ERROR_OK;
 }
diff --git a/src/rtos/rtos.c b/src/rtos/rtos.c
index 11cb792..4894b1d 100644
--- a/src/rtos/rtos.c
+++ b/src/rtos/rtos.c
@@ -189,8 +189,8 @@ 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;
-       size_t reply_len;
+       uint64_t addr = 0;
+       size_t reply_len = 0;
        char reply[GDB_BUFFER_SIZE], cur_sym[GDB_BUFFER_SIZE / 2] = "", 
*next_sym;
        struct target *target = get_target_from_connection(connection);
        struct rtos *os = target->rtos;
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c
index c49f87c..ce46510 100644
--- a/src/server/gdb_server.c
+++ b/src/server/gdb_server.c
@@ -2193,6 +2193,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);
@@ -2206,7 +2207,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) {

-- 

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to