openocd: type-cast fix

Fixed type-cast.
As we are using -fpermissive, it won't compile otherwise.

Change-Id: I97180c3d642065a501540bc0d9c58328d2ed4188
This commit is contained in:
Lars Rademacher
2013-10-21 02:04:27 +02:00
parent 81210d17b2
commit 2f6111b2f4
2 changed files with 2 additions and 2 deletions

View File

@ -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 */

View File

@ -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 */