From 88525858eefc77ec50627f1db06a50666bc3e292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Mon, 14 Apr 2014 12:22:16 +0200 Subject: [PATCH 4/4] ptr_container: suppress GCC -Wunused-parameter warnings Signed-off-by: Michael Stahl --- include/boost/ptr_container/detail/reversible_ptr_container.hpp | 4 ++++ include/boost/ptr_container/ptr_sequence_adapter.hpp | 1 + 2 files changed, 5 insertions(+) diff --git a/include/boost/ptr_container/detail/reversible_ptr_container.hpp b/include/boost/ptr_container/detail/reversible_ptr_container.hpp index bb0eb0e..007fe04 100644 --- a/include/boost/ptr_container/detail/reversible_ptr_container.hpp +++ b/include/boost/ptr_container/detail/reversible_ptr_container.hpp @@ -259,6 +259,10 @@ namespace ptr_container_detail static void enforce_null_policy( const Ty_* x, const char* msg ) { +#ifdef BOOST_PTR_CONTAINER_NO_EXCEPTIONS + (void)x; + (void)msg; +#endif if( !allow_null ) { BOOST_PTR_CONTAINER_THROW_EXCEPTION( 0 == x && "null not allowed", diff --git a/include/boost/ptr_container/ptr_sequence_adapter.hpp b/include/boost/ptr_container/ptr_sequence_adapter.hpp index 1d44ae5..c097a97 100644 --- a/include/boost/ptr_container/ptr_sequence_adapter.hpp +++ b/include/boost/ptr_container/ptr_sequence_adapter.hpp @@ -671,6 +671,7 @@ namespace ptr_container_detail void range_check_impl( iterator first, iterator last, std::random_access_iterator_tag ) { + (void)first; (void)last; BOOST_ASSERT( first <= last && "out of range unique()/erase_if()" ); BOOST_ASSERT( this->begin() <= first && "out of range unique()/erase_if()" ); BOOST_ASSERT( last <= this->end() && "out of range unique()/erase_if)(" ); -- 1.8.3.1