summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-11-12 15:56:29 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-11-14 10:14:58 +0100
commit9a01133a66498b3ea637a7e75ed9094a5fc32c43 (patch)
tree0ef1278f1e2dfc55de7a8e9cd90ae5de6347ddb0
parent89b1a0419f39aacffa2fbe5b52793d17d7bdc437 (diff)
-Werror,-Wunused-member-function
Change-Id: I557d9628478b0cddf5a2b176403bdd67db5a0695
-rw-r--r--cppu/qa/test_unotype.cxx14
1 files changed, 14 insertions, 0 deletions
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());