From 6e67c03dc0225fc66343546b14e902b9d238b1a3 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 14 Mar 2012 13:27:56 +0100 Subject: Enable -Wnon-virtual-dtor for GCC 4.6 ...which has the necessary features to support it. Change a lot of classes to either contain a protected non-virtual dtor (which is backwards compatible, so even works for cppumaker-generated UNO headers) or a public virtual one. cppuhelper/propertysetmixin.hxx still needs to disable the warning, as the relevant class has a non-virtual dtor but friends, which would still cause GCC to warn. Includes a patch for libcmis, intended to be upstreamed. --- store/source/lockbyte.hxx | 3 +++ store/source/object.hxx | 3 +++ store/source/storbase.hxx | 3 +++ store/source/storcach.hxx | 3 +++ 4 files changed, 12 insertions(+) (limited to 'store/source') diff --git a/store/source/lockbyte.hxx b/store/source/lockbyte.hxx index c54b64d538c8..8a6d01cc027d 100644 --- a/store/source/lockbyte.hxx +++ b/store/source/lockbyte.hxx @@ -111,6 +111,9 @@ public: */ storeError flush(); +protected: + ~ILockBytes() {} + private: /** Implementation (abstract). */ diff --git a/store/source/object.hxx b/store/source/object.hxx index 6f30372fdac4..5a6c9d9887fd 100644 --- a/store/source/object.hxx +++ b/store/source/object.hxx @@ -49,6 +49,9 @@ public: /** Replaces dynamic_cast type checking. */ virtual sal_Bool SAL_CALL isKindOf (sal_uInt32 nTypeId) = 0; + +protected: + ~IStoreHandle() {} }; diff --git a/store/source/storbase.hxx b/store/source/storbase.hxx index 9e7308936b3c..06c322ac47c8 100644 --- a/store/source/storbase.hxx +++ b/store/source/storbase.hxx @@ -511,6 +511,9 @@ struct PageData static storeError createInstance ( rtl::Reference< PageData::Allocator > & rxAllocator, sal_uInt16 nPageSize); + protected: + ~Allocator() {} + private: /** Implementation (abstract). */ diff --git a/store/source/storcach.hxx b/store/source/storcach.hxx index 46ad5eff15f0..60edc04ad889 100644 --- a/store/source/storcach.hxx +++ b/store/source/storcach.hxx @@ -70,6 +70,9 @@ public: storeError removePageAt ( sal_uInt32 nOffset); +protected: + ~PageCache() {} + private: /** Implementation (abstract). */ -- cgit v1.2.3