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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user