diff --git a/include/boost/circular_buffer/debug.hpp b/include/boost/circular_buffer/debug.hpp index b6ab0fe..6559a67 100644 --- a/include/boost/circular_buffer/debug.hpp +++ b/include/boost/circular_buffer/debug.hpp @@ -34,6 +34,10 @@ const int UNINITIALIZED = 0xcc; template inline void do_fill_uninitialized_memory(T* data, std::size_t size_in_bytes) BOOST_NOEXCEPT { +#if defined(__GNUC__) && __GNUC__ < 5 + // Avoid warning for calling memset with a constant size of zero + if( size_in_bytes ) +#endif std::memset(static_cast(data), UNINITIALIZED, size_in_bytes); }