From 3b5a24c13b320fc0fd09e0dfacb5854b378eec34 Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Tue, 12 May 2020 02:52:30 +0200 Subject: [PATCH] openocd: properly use jim data types The jim library exports all the data types through typedef, so there is no need to use the internal struct types. Fix the few remaining inconsistencies in the code. Change-Id: Id4ae0083563ea7a371833374e7b39f17158f66a4 Signed-off-by: Antonio Borneo Reviewed-on: http://openocd.zylin.com/5662 Reviewed-by: Andreas Fritiofson Tested-by: jenkins --- src/rtos/rtos.c | 2 +- src/target/target.c | 2 +- src/target/target.h | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/rtos/rtos.c b/src/rtos/rtos.c index 2212348286..ff0fb9286c 100644 --- a/src/rtos/rtos.c +++ b/src/rtos/rtos.c @@ -121,7 +121,7 @@ int rtos_create(Jim_GetOptInfo *goi, struct target *target) { int x; const char *cp; - struct Jim_Obj *res; + Jim_Obj *res; int e; if (!goi->isconfigure && goi->argc != 0) { diff --git a/src/target/target.c b/src/target/target.c index b0deadb0b0..c0953a3f1c 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -5011,7 +5011,7 @@ static int jim_target_examine(Jim_Interp *interp, int argc, Jim_Obj *const *argv if (goi.argc > 0 && strcmp(Jim_GetString(argv[1], NULL), "allow-defer") == 0) { /* consume it */ - struct Jim_Obj *obj; + Jim_Obj *obj; int e = Jim_GetOpt_Obj(&goi, &obj); if (e != JIM_OK) return e; diff --git a/src/target/target.h b/src/target/target.h index fc150442d4..c69aa934a6 100644 --- a/src/target/target.h +++ b/src/target/target.h @@ -32,6 +32,7 @@ #define OPENOCD_TARGET_TARGET_H #include +#include struct reg; struct trace; @@ -293,8 +294,8 @@ enum target_event { struct target_event_action { enum target_event event; - struct Jim_Interp *interp; - struct Jim_Obj *body; + Jim_Interp *interp; + Jim_Obj *body; struct target_event_action *next; }; -- 2.30.2