diff --git a/libuavcan/include/uavcan/dynamic_memory.hpp b/libuavcan/include/uavcan/dynamic_memory.hpp index 9ef7322a38..da977d8c68 100644 --- a/libuavcan/include/uavcan/dynamic_memory.hpp +++ b/libuavcan/include/uavcan/dynamic_memory.hpp @@ -138,6 +138,9 @@ public: template const uint16_t PoolAllocator::NumBlocks; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-align" + template PoolAllocator::PoolAllocator() : free_list_(reinterpret_cast(pool_.bytes)), @@ -155,6 +158,7 @@ PoolAllocator::PoolAllocator() : } free_list_[NumBlocks - 1].next = UAVCAN_NULLPTR; } +#pragma GCC diagnostic pop template void* PoolAllocator::allocate(std::size_t size)