[prev in list] [next in list] [prev in thread] [next in thread]
List: openocd-development
Subject: [OpenOCD-devel] [PATCH]: 30d9383 topic: fixed uninitialized and format errors
From: gerrit () openocd ! zylin ! com
Date: 2013-12-29 1:21:47
Message-ID: 20131229012147.AC0DF242A3 () openocd ! zylin ! com
[Download RAW message or body]
This is an automated email from Gerrit.
David Weese (dave.weese@googlemail.com) just uploaded a new patch set to Gerrit, \
which you can find at http://openocd.zylin.com/1845
-- gerrit
commit 30d93835bdbdd0c876ed821c5768e251e02ef704
Author: David Weese <dave.weese@googlemail.com>
Date: Sun Dec 29 01:47:28 2013 +0100
topic: fixed uninitialized and format errors
Fixed a couple of compile errors on Mac OS X Mavericks.
Change-Id: I2a2f517bc9036b3a3c3f842216e6ce046351bb08
Signed-off-by: David Weese <dave.weese@googlemail.com>
diff --git a/src/flash/nor/mdr.c b/src/flash/nor/mdr.c
index 3ecee1c..d3632b0 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;
if (bank->target->state != TARGET_HALTED) {
LOG_ERROR("Target not halted");
@@ -348,7 +348,7 @@ static int mdr_write(struct flash_bank *bank, uint8_t *buffer,
buffer[count++] = 0xff;
}
- uint32_t flash_cmd, cur_per_clock;
+ uint32_t flash_cmd = 0, cur_per_clock;
int retval, retval2;
retval = target_read_u32(target, MD_PER_CLOCK, &cur_per_clock);
diff --git a/src/flash/nor/stm32f1x.c b/src/flash/nor/stm32f1x.c
index ce0708f..30652c6 100644
--- a/src/flash/nor/stm32f1x.c
+++ b/src/flash/nor/stm32f1x.c
@@ -1347,9 +1347,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..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);
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c
index 28cb3ab..035bf4c 100644
--- a/src/server/gdb_server.c
+++ b/src/server/gdb_server.c
@@ -2199,6 +2199,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);
@@ -2212,7 +2213,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) {
--
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic