From: Daniel Arndt Date: Fri, 3 Aug 2018 08:32:58 +0000 (+0200) Subject: Fix warning regarding unused parameter X-Git-Tag: v9.1.0-rc1~852^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=781825aeed2c629cedd99b0f4ac4874066d25139;p=dealii.git Fix warning regarding unused parameter --- diff --git a/include/deal.II/base/utilities.h b/include/deal.II/base/utilities.h index 298ea3f42d..bcb1e8a33f 100644 --- a/include/deal.II/base/utilities.h +++ b/include/deal.II/base/utilities.h @@ -1047,6 +1047,9 @@ namespace Utilities std::vector &dest_buffer, const bool allow_compression) { + // the data is never compressed when we can't use zlib. + (void)allow_compression; + // see if the object is small and copyable via memcpy. if so, use // this fast path. otherwise, we have to go through the BOOST // serialization machinery @@ -1064,7 +1067,6 @@ namespace Utilities # endif #endif { - (void)allow_compression; const size_t previous_size = dest_buffer.size(); dest_buffer.resize(previous_size + sizeof(T)); @@ -1123,6 +1125,9 @@ namespace Utilities const std::vector::const_iterator &cend, const bool allow_compression) { + // the data is never compressed when we can't use zlib. + (void)allow_compression; + // see if the object is small and copyable via memcpy. if so, use // this fast path. otherwise, we have to go through the BOOST // serialization machinery @@ -1140,7 +1145,6 @@ namespace Utilities # endif #endif { - (void)allow_compression; Assert(std::distance(cbegin, cend) == sizeof(T), ExcInternalError()); T object; std::memcpy(&object, &*cbegin, sizeof(T));