From 2f6111b2f4a1f986d36a255c0b7f6a6af6e8af3d Mon Sep 17 00:00:00 2001 From: Lars Rademacher Date: Mon, 21 Oct 2013 02:04:27 +0200 Subject: [PATCH] openocd: type-cast fix Fixed type-cast. As we are using -fpermissive, it won't compile otherwise. Change-Id: I97180c3d642065a501540bc0d9c58328d2ed4188 --- debuggers/openocd/src/target/armv7a.h | 2 +- debuggers/openocd/src/target/cortex_a.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 */