From 9a01133a66498b3ea637a7e75ed9094a5fc32c43 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 12 Nov 2013 15:56:29 +0100 Subject: -Werror,-Wunused-member-function Change-Id: I557d9628478b0cddf5a2b176403bdd67db5a0695 --- cppu/qa/test_unotype.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'cppu/qa') diff --git a/cppu/qa/test_unotype.cxx b/cppu/qa/test_unotype.cxx index 06f6763f580c..474e5c905108 100644 --- a/cppu/qa/test_unotype.cxx +++ b/cppu/qa/test_unotype.cxx @@ -59,12 +59,20 @@ struct DerivedInterface1: css::uno::XInterface { private: ~DerivedInterface1() {} // avoid warnings about virtual members and non-virtual dtor + +public: + static void dummy(DerivedInterface1 * p) { p->~DerivedInterface1(); } + // ...and avoid warnings about unused ~DerivedInterface1 (see below) }; struct DerivedInterface2: css::uno::XComponentContext { private: ~DerivedInterface2() {} // avoid warnings about virtual members and non-virtual dtor + +public: + static void dummy(DerivedInterface2 * p) { p->~DerivedInterface2(); } + // ...and avoid warnings about unused ~DerivedInterface2 (see below) }; class Test: public ::CppUnit::TestFixture { @@ -83,6 +91,12 @@ public: }; void Test::testUnoType() { + // Avoid warnings about unused ~DerivedInterface1/2 (see above): + if (false) { + DerivedInterface1::dummy(0); + DerivedInterface2::dummy(0); + } + css::uno::Type t; t = ::cppu::UnoType< ::cppu::UnoVoidType >::get(); CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_VOID, +t.getTypeClass()); -- cgit v1.2.3