aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/include/odp_timer_internal.h
diff options
context:
space:
mode:
authorTaras Kondratiuk <taras.kondratiuk@linaro.org>2014-07-01 21:00:02 +0300
committerMaxim Uvarov <maxim.uvarov@linaro.org>2014-07-03 14:08:46 +0400
commit9cb35b5b467bf6a82efa75119c0e219d69d36d81 (patch)
tree5beef7b5871094ec13a74491457f0abd4f207186 /platform/linux-generic/include/odp_timer_internal.h
parent91a5f5ca77cd71e29b64335c798a5fe420b87d8c (diff)
linux-generic: timer: Suppress cast-align warning
Casting odp_buffer_hdr_t to odp_timeout_hdr_t generates -Wcast-align warning, because these structures may have different alignment requirements. Suppress the warning by casting to intermediate integer type. Reported-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
Diffstat (limited to 'platform/linux-generic/include/odp_timer_internal.h')
-rw-r--r--platform/linux-generic/include/odp_timer_internal.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/linux-generic/include/odp_timer_internal.h b/platform/linux-generic/include/odp_timer_internal.h
index 76f1545ee..c6e3de667 100644
--- a/platform/linux-generic/include/odp_timer_internal.h
+++ b/platform/linux-generic/include/odp_timer_internal.h
@@ -66,7 +66,8 @@ ODP_ASSERT(sizeof(odp_timeout_hdr_t) % sizeof(uint64_t) == 0,
*/
static inline odp_timeout_hdr_t *odp_timeout_hdr(odp_timeout_t tmo)
{
- return (odp_timeout_hdr_t *)odp_buf_to_hdr((odp_buffer_t)tmo);
+ odp_buffer_hdr_t *buf_hdr = odp_buf_to_hdr((odp_buffer_t)tmo);
+ return (odp_timeout_hdr_t *)(uintptr_t)buf_hdr;
}