diff --git a/debuggers/openocd/src/target/armv7a.h b/debuggers/openocd/src/target/armv7a.h index 575363d1..e8d8cfbd 100644 --- a/debuggers/openocd/src/target/armv7a.h +++ b/debuggers/openocd/src/target/armv7a.h @@ -118,7 +118,7 @@ struct armv7a_common { static inline struct armv7a_common * target_to_armv7a(struct target *target) { - return container_of(target->arch_info, struct armv7a_common, arm); + return container_of((const struct arm*)(target->arch_info), struct armv7a_common, arm); } /* register offsets from armv7a.debug_base */ diff --git a/debuggers/openocd/src/target/cortex_a.h b/debuggers/openocd/src/target/cortex_a.h index f34ea674..1eb7eef9 100644 --- a/debuggers/openocd/src/target/cortex_a.h +++ b/debuggers/openocd/src/target/cortex_a.h @@ -83,7 +83,7 @@ struct cortex_a8_common { static inline struct cortex_a8_common * target_to_cortex_a8(struct target *target) { - return container_of(target->arch_info, struct cortex_a8_common, armv7a_common.arm); + return container_of((const struct arm*)(target->arch_info), struct cortex_a8_common, armv7a_common.arm); } #endif /* CORTEX_A8_H */