aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2023-04-08 23:59:42 +0200
committerAntonio Borneo <borneo.antonio@gmail.com>2023-05-05 22:08:21 +0000
commitd4fe63e36b662ad274783585ff7222befbf54268 (patch)
tree0b12ba2c07ccf1084b39245523e825e378186a1b
parent6e4000df9e37ea7eb857c3dcd707057d47a5d0ca (diff)
downloadriscv-openocd-d4fe63e36b662ad274783585ff7222befbf54268.zip
riscv-openocd-d4fe63e36b662ad274783585ff7222befbf54268.tar.gz
riscv-openocd-d4fe63e36b662ad274783585ff7222befbf54268.tar.bz2
flash: nor: add static to local symbols
Add static type to symbols that are not used elsewhere. Detected through 'sparse' tool. Change-Id: I2bdac5d2b06a6dbed5c27bfdb1cf36eee90ad823 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7594 Tested-by: jenkins
-rw-r--r--src/flash/nor/numicro.c4
-rw-r--r--src/flash/nor/rsl10.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/flash/nor/numicro.c b/src/flash/nor/numicro.c
index 0b04ce4..a0c6e0c 100644
--- a/src/flash/nor/numicro.c
+++ b/src/flash/nor/numicro.c
@@ -536,8 +536,8 @@ struct numicro_flash_bank {
};
/* Private variables */
-uint32_t m_page_size = NUMICRO_PAGESIZE;
-uint32_t m_address_bias_offset;
+static uint32_t m_page_size = NUMICRO_PAGESIZE;
+static uint32_t m_address_bias_offset;
/* Private methods */
static int numicro_get_arm_arch(struct target *target)
diff --git a/src/flash/nor/rsl10.c b/src/flash/nor/rsl10.c
index d92c4b8..5f0ac9b 100644
--- a/src/flash/nor/rsl10.c
+++ b/src/flash/nor/rsl10.c
@@ -107,7 +107,7 @@ static const char *const rsl10_error_list[] = {
[RSL10_FLASH_ERR_PROG_FAILED] = "prog failed",
};
-const char *rsl10_error(enum rsl10_flash_status x)
+static const char *rsl10_error(enum rsl10_flash_status x)
{
if (x >= RSL10_FLASH_MAX_ERR_CODES || !rsl10_error_list[x])
return "unknown";