diff options
author | Øyvind Harboe <oyvind.harboe@zylin.com> | 2010-12-29 22:07:21 +0100 |
---|---|---|
committer | Øyvind Harboe <oyvind.harboe@zylin.com> | 2010-12-29 22:07:39 +0100 |
commit | 4f9a9b8ebae8425eda3a71ccb782789cd3b8f6b7 (patch) | |
tree | 5143ec75e22a2f648a9375632948ce09a16ee642 /src/flash/nor | |
parent | 8f93c0a3fe29313945a63b3f2154baef70acd796 (diff) | |
download | riscv-openocd-4f9a9b8ebae8425eda3a71ccb782789cd3b8f6b7.zip riscv-openocd-4f9a9b8ebae8425eda3a71ccb782789cd3b8f6b7.tar.gz riscv-openocd-4f9a9b8ebae8425eda3a71ccb782789cd3b8f6b7.tar.bz2 |
warnings: use more 'const' for char *
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/flash/nor')
-rw-r--r-- | src/flash/nor/at91sam7.c | 2 | ||||
-rw-r--r-- | src/flash/nor/core.h | 2 | ||||
-rw-r--r-- | src/flash/nor/driver.h | 2 | ||||
-rw-r--r-- | src/flash/nor/lpc288x.c | 2 | ||||
-rw-r--r-- | src/flash/nor/pic32mx.c | 2 | ||||
-rw-r--r-- | src/flash/nor/stellaris.c | 4 | ||||
-rw-r--r-- | src/flash/nor/tms470.c | 4 |
7 files changed, 9 insertions, 9 deletions
diff --git a/src/flash/nor/at91sam7.c b/src/flash/nor/at91sam7.c index 3fabe47..ad6ee6c 100644 --- a/src/flash/nor/at91sam7.c +++ b/src/flash/nor/at91sam7.c @@ -125,7 +125,7 @@ struct at91sam7_flash_bank uint16_t cidr_nvpsiz2; uint16_t cidr_eproc; uint16_t cidr_version; - char *target_name; + const char *target_name; /* flash auto-detection */ uint8_t flash_autodetection; diff --git a/src/flash/nor/core.h b/src/flash/nor/core.h index ff14df0..8f7dce8 100644 --- a/src/flash/nor/core.h +++ b/src/flash/nor/core.h @@ -74,7 +74,7 @@ struct flash_sector */ struct flash_bank { - char *name; + const char *name; struct target *target; /**< Target to which this bank belongs. */ diff --git a/src/flash/nor/driver.h b/src/flash/nor/driver.h index cbf9c52..afd0528 100644 --- a/src/flash/nor/driver.h +++ b/src/flash/nor/driver.h @@ -54,7 +54,7 @@ struct flash_driver * Gives a human-readable name of this flash driver, * This field is used to select and initialize the driver. */ - char *name; + const char *name; /** * An array of driver-specific commands to register. When called diff --git a/src/flash/nor/lpc288x.c b/src/flash/nor/lpc288x.c index d8cecc0..589527f 100644 --- a/src/flash/nor/lpc288x.c +++ b/src/flash/nor/lpc288x.c @@ -91,7 +91,7 @@ struct lpc288x_flash_bank /* chip id register */ uint32_t cidr; - char * target_name; + const char * target_name; uint32_t cclk; uint32_t sector_size_break; diff --git a/src/flash/nor/pic32mx.c b/src/flash/nor/pic32mx.c index 4b8d027..6a27702 100644 --- a/src/flash/nor/pic32mx.c +++ b/src/flash/nor/pic32mx.c @@ -99,7 +99,7 @@ struct pic32mx_flash_bank static const struct pic32mx_devs_s { uint8_t devid; - char *name; + const char *name; } pic32mx_devs[] = { {0x38, "360F512L"}, {0x34, "360F256L"}, diff --git a/src/flash/nor/stellaris.c b/src/flash/nor/stellaris.c index 12ea15b..851cab3 100644 --- a/src/flash/nor/stellaris.c +++ b/src/flash/nor/stellaris.c @@ -100,7 +100,7 @@ struct stellaris_flash_bank uint32_t dc0; uint32_t dc1; - char * target_name; + const char * target_name; uint32_t sramsiz; uint32_t flshsz; @@ -125,7 +125,7 @@ struct stellaris_flash_bank static struct { uint32_t partno; - char *partname; + const char *partname; } StellarisParts[] = { {0x0001,"LM3S101"}, diff --git a/src/flash/nor/tms470.c b/src/flash/nor/tms470.c index 4ca6cd8..dd9ff5b 100644 --- a/src/flash/nor/tms470.c +++ b/src/flash/nor/tms470.c @@ -38,7 +38,7 @@ struct tms470_flash_bank uint32_t technology_family; uint32_t rom_flash; uint32_t part_number; - char * part_name; + const char * part_name; }; @@ -129,7 +129,7 @@ static int tms470_read_part_info(struct flash_bank *bank) uint32_t technology_family; uint32_t rom_flash; uint32_t part_number; - char *part_name; + const char *part_name; /* we shall not rely on the caller in this test, this function allocates memory, thus and executing the code more than once may cause memory leak */ |