aboutsummaryrefslogtreecommitdiff
path: root/src/target/stm8.c
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2023-05-01 00:00:47 +0200
committerAntonio Borneo <borneo.antonio@gmail.com>2023-05-18 09:54:59 +0000
commited46188a72492148be3c694bfea1f6a2fb92b646 (patch)
tree140651a08b890934cf7fe983630ba95dd7bd8ca3 /src/target/stm8.c
parent3a4f445bd92101d3daee3715178d3fbff3b7b029 (diff)
downloadriscv-openocd-ed46188a72492148be3c694bfea1f6a2fb92b646.zip
riscv-openocd-ed46188a72492148be3c694bfea1f6a2fb92b646.tar.gz
riscv-openocd-ed46188a72492148be3c694bfea1f6a2fb92b646.tar.bz2
target: move in target_type.h the target_type's declaration
The static analyser 'sparse' complains, while compiling a target's file, that the struct target_type is declared in the file as non static, but it is not exposed through an include file. The message is: warning: symbol 'XXX' was not declared. Should it be static? Move the list of target_type's declaration in target_type.h While there, fix a name clash in stm8.c Change-Id: Ia9c681e0825cfd04d509616dbc04a0cf4944f379 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7659 Tested-by: jenkins
Diffstat (limited to 'src/target/stm8.c')
-rw-r--r--src/target/stm8.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/target/stm8.c b/src/target/stm8.c
index aa934c9..9fd6509 100644
--- a/src/target/stm8.c
+++ b/src/target/stm8.c
@@ -542,12 +542,12 @@ static int stm8_get_core_reg(struct reg *reg)
int retval;
struct stm8_core_reg *stm8_reg = reg->arch_info;
struct target *target = stm8_reg->target;
- struct stm8_common *stm8_target = target_to_stm8(target);
+ struct stm8_common *stm8 = target_to_stm8(target);
if (target->state != TARGET_HALTED)
return ERROR_TARGET_NOT_HALTED;
- retval = stm8_target->read_core_reg(target, stm8_reg->num);
+ retval = stm8->read_core_reg(target, stm8_reg->num);
return retval;
}