diff --git a/src/util/SpanCast.hxx b/src/util/SpanCast.hxx index a1bccac63..0ca95bc40 100644 --- a/src/util/SpanCast.hxx +++ b/src/util/SpanCast.hxx @@ -47,8 +47,11 @@ FromBytesFloor(std::span> other) noexcept { static_assert(sizeof(T) > 0, "Empty base type"); + /* TODO: the "void *" cast suppresses alignment + warnings, but should we really suppress them? */ + return { - reinterpret_cast(other.data()), + reinterpret_cast(reinterpret_cast *>(other.data())), other.size() / sizeof(T), }; }