From dbbcbc36161cd6a4396c5b17d3edc96f4e9b9562 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 9 Dec 2014 23:10:05 +0100 Subject: Util/Manual: cast via void* to avoid alignment warnings --- src/util/Manual.hxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/util/Manual.hxx b/src/util/Manual.hxx index 6f080ff29..6ba932bdd 100644 --- a/src/util/Manual.hxx +++ b/src/util/Manual.hxx @@ -95,13 +95,15 @@ public: T &Get() { assert(initialized); - return *(T *)data; + void *p = static_cast(data); + return *static_cast(p); } const T &Get() const { assert(initialized); - return *(const T *)data; + const void *p = static_cast(data); + return *static_cast(p); } operator T &() { -- cgit v1.2.3