Kaydet (Commit) 9a01133a authored tarafından Stephan Bergmann's avatar Stephan Bergmann

-Werror,-Wunused-member-function

Change-Id: I557d9628478b0cddf5a2b176403bdd67db5a0695
üst 89b1a041
......@@ -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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment