diff options
-rw-r--r-- | include/o3tl/heap_ptr.hxx | 4 | ||||
-rw-r--r-- | o3tl/qa/test-heap_ptr.cxx | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/include/o3tl/heap_ptr.hxx b/include/o3tl/heap_ptr.hxx index 4a7e3683f68d..eca82a7c692d 100644 --- a/include/o3tl/heap_ptr.hxx +++ b/include/o3tl/heap_ptr.hxx @@ -23,7 +23,7 @@ #include <boost/assert.hpp> #include <boost/checked_delete.hpp> - +#include <sal/types.h> namespace o3tl { @@ -72,7 +72,7 @@ namespace o3tl complain. */ template <class T, class Deleter = boost::checked_deleter<T> > -class heap_ptr +class SAL_WARN_UNUSED heap_ptr { public: typedef T element_type; /// Provided for generic programming. diff --git a/o3tl/qa/test-heap_ptr.cxx b/o3tl/qa/test-heap_ptr.cxx index f863b6cd3f8b..4fbfe1957f7a 100644 --- a/o3tl/qa/test-heap_ptr.cxx +++ b/o3tl/qa/test-heap_ptr.cxx @@ -138,6 +138,7 @@ class heap_ptr_test : public CppUnit::TestFixture { heap_ptr<Help> t_raii( new Help(55) ); + (void)t_raii; CPPUNIT_ASSERT_MESSAGE("raii1", Help::InstanceCount_() == nHelpCount + 1); } CPPUNIT_ASSERT_MESSAGE("raii2", Help::InstanceCount_() == nHelpCount); |