summaryrefslogtreecommitdiff
path: root/src/flash/nor
diff options
context:
space:
mode:
authorFreddie Chopin <freddie_chopin@op.pl>2011-06-03 22:10:03 +0200
committerØyvind Harboe <oyvind.harboe@zylin.com>2011-06-04 09:35:13 +0200
commitf6315d5e5b7b71515ef051711e5f818a42d6b3b3 (patch)
tree197f51e416132298d9c2571163e2be72e735c115 /src/flash/nor
parentae02a0e51708d292b4dff67c12baef1b62b367fa (diff)
downloadopenocd+libswd-f6315d5e5b7b71515ef051711e5f818a42d6b3b3.tar.gz
openocd+libswd-f6315d5e5b7b71515ef051711e5f818a42d6b3b3.tar.bz2
openocd+libswd-f6315d5e5b7b71515ef051711e5f818a42d6b3b3.tar.xz
openocd+libswd-f6315d5e5b7b71515ef051711e5f818a42d6b3b3.zip
Fix "unused variable" warnings (errors) detected with GCC 4.7.0 - trivial fixes
Diffstat (limited to 'src/flash/nor')
-rw-r--r--src/flash/nor/core.c2
-rw-r--r--src/flash/nor/em357.c3
-rw-r--r--src/flash/nor/pic32mx.c3
-rw-r--r--src/flash/nor/stm32x.c3
-rw-r--r--src/flash/nor/str9x.c3
5 files changed, 0 insertions, 14 deletions
diff --git a/src/flash/nor/core.c b/src/flash/nor/core.c
index ab1bf031..4b5fe7dd 100644
--- a/src/flash/nor/core.c
+++ b/src/flash/nor/core.c
@@ -621,7 +621,6 @@ int flash_write_unlock(struct target *target, struct image *image,
{
uint32_t buffer_size;
uint8_t *buffer;
- int section_first;
int section_last;
uint32_t run_address = sections[section]->base_address + section_offset;
uint32_t run_size = sections[section]->size - section_offset;
@@ -649,7 +648,6 @@ int flash_write_unlock(struct target *target, struct image *image,
}
/* collect consecutive sections which fall into the same bank */
- section_first = section;
section_last = section;
padding[section] = 0;
while ((run_address + run_size - 1 < c->base + c->size - 1)
diff --git a/src/flash/nor/em357.c b/src/flash/nor/em357.c
index 8a3cf4c2..a62be6af 100644
--- a/src/flash/nor/em357.c
+++ b/src/flash/nor/em357.c
@@ -813,7 +813,6 @@ COMMAND_HANDLER(em357_handle_lock_command)
COMMAND_HANDLER(em357_handle_unlock_command)
{
struct target *target = NULL;
- struct em357_flash_bank *em357_info = NULL;
if (CMD_ARGC < 1)
{
@@ -826,8 +825,6 @@ COMMAND_HANDLER(em357_handle_unlock_command)
if (ERROR_OK != retval)
return retval;
- em357_info = bank->driver_priv;
-
target = bank->target;
if (target->state != TARGET_HALTED)
diff --git a/src/flash/nor/pic32mx.c b/src/flash/nor/pic32mx.c
index a8392eb8..69321ac3 100644
--- a/src/flash/nor/pic32mx.c
+++ b/src/flash/nor/pic32mx.c
@@ -313,11 +313,8 @@ static int pic32mx_erase(struct flash_bank *bank, int first, int last)
static int pic32mx_protect(struct flash_bank *bank, int set, int first, int last)
{
- struct pic32mx_flash_bank *pic32mx_info = NULL;
struct target *target = bank->target;
- pic32mx_info = bank->driver_priv;
-
if (target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
diff --git a/src/flash/nor/stm32x.c b/src/flash/nor/stm32x.c
index 3914d25c..b4300bef 100644
--- a/src/flash/nor/stm32x.c
+++ b/src/flash/nor/stm32x.c
@@ -1217,7 +1217,6 @@ COMMAND_HANDLER(stm32x_handle_lock_command)
COMMAND_HANDLER(stm32x_handle_unlock_command)
{
struct target *target = NULL;
- struct stm32x_flash_bank *stm32x_info = NULL;
if (CMD_ARGC < 1)
{
@@ -1230,8 +1229,6 @@ COMMAND_HANDLER(stm32x_handle_unlock_command)
if (ERROR_OK != retval)
return retval;
- stm32x_info = bank->driver_priv;
-
target = bank->target;
if (target->state != TARGET_HALTED)
diff --git a/src/flash/nor/str9x.c b/src/flash/nor/str9x.c
index 303daa04..61a438fc 100644
--- a/src/flash/nor/str9x.c
+++ b/src/flash/nor/str9x.c
@@ -681,7 +681,6 @@ static int get_str9x_info(struct flash_bank *bank, char *buf, int buf_size)
COMMAND_HANDLER(str9x_handle_flash_config_command)
{
- struct str9x_flash_bank *str9x_info;
struct target *target = NULL;
if (CMD_ARGC < 5)
@@ -700,8 +699,6 @@ COMMAND_HANDLER(str9x_handle_flash_config_command)
COMMAND_PARSE_NUMBER(u32, CMD_ARGV[3], bbadr);
COMMAND_PARSE_NUMBER(u32, CMD_ARGV[4], nbbadr);
- str9x_info = bank->driver_priv;
-
target = bank->target;
if (bank->target->state != TARGET_HALTED)