summaryrefslogtreecommitdiff
path: root/connectivity/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-03-14 13:27:56 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-03-14 13:32:02 +0100
commit6e67c03dc0225fc66343546b14e902b9d238b1a3 (patch)
tree6e078783d65e280a721b4e46f0ae0ca6b950f121 /connectivity/source
parentfe4be5047988782f3143a1af505c5eecb3f2af5a (diff)
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.
Diffstat (limited to 'connectivity/source')
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx2
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx3
-rw-r--r--connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx3
-rwxr-xr-xconnectivity/source/drivers/mozab/post_include_mozilla.h4
-rwxr-xr-xconnectivity/source/drivers/mozab/pre_include_mozilla.h5
-rw-r--r--connectivity/source/inc/TResultSetHelper.hxx3
-rw-r--r--connectivity/source/inc/hsqldb/HConnection.hxx3
-rw-r--r--connectivity/source/sdbcx/VCollection.cxx3
8 files changed, 21 insertions, 5 deletions
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx
index 00a061c9b102..12d4fa9aeb0e 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx
@@ -601,8 +601,10 @@ nsProfile::CreateInstance(nsISupports* aOuter, const nsID& aIID,
}
//Register profile manager
+#include "pre_include_mozilla.h"
#include "nsIComponentManager.h"
#include "nsIComponentRegistrar.h"
+#include "post_include_mozilla.h"
static const nsCID kProfileManagerCID = NS_PROFILE_CID;
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
index 16787167476b..98a4a949507c 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
@@ -66,9 +66,10 @@
#include <rmsdef.h>
#endif
+#include "pre_include_mozilla.h"
#include "nsICharsetConverterManager.h"
#include "nsIPlatformCharset.h"
-
+#include "post_include_mozilla.h"
#if defined (XP_UNIX)
# define USER_ENVIRONMENT_VARIABLE "USER"
diff --git a/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx b/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx
index 70a6b7bff246..ebee40a1419f 100644
--- a/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx
+++ b/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx
@@ -40,7 +40,10 @@
#include <osl/mutex.hxx>
#include <osl/conditn.hxx>
+#include "pre_include_mozilla.h"
#include <nsIAbDirFactoryService.h>
+#include "post_include_mozilla.h"
+
#include <MNSInit.hxx>
#include <MNameMapper.hxx>
#include "MNSMozabProxy.hxx"
diff --git a/connectivity/source/drivers/mozab/post_include_mozilla.h b/connectivity/source/drivers/mozab/post_include_mozilla.h
index a63db2b480c8..37fbc9a278b4 100755
--- a/connectivity/source/drivers/mozab/post_include_mozilla.h
+++ b/connectivity/source/drivers/mozab/post_include_mozilla.h
@@ -26,7 +26,9 @@
*
************************************************************************/
-#if defined __SUNPRO_CC
+#if defined __GNUC__ && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4)
+#pragma GCC diagnostic pop
+#elif defined __SUNPRO_CC
#pragma enable_warn
#elif defined _MSC_VER
#pragma warning(pop)
diff --git a/connectivity/source/drivers/mozab/pre_include_mozilla.h b/connectivity/source/drivers/mozab/pre_include_mozilla.h
index 7e2c5fe6607d..81e407ba37d4 100755
--- a/connectivity/source/drivers/mozab/pre_include_mozilla.h
+++ b/connectivity/source/drivers/mozab/pre_include_mozilla.h
@@ -55,8 +55,9 @@
#endif
#endif
-#if defined __GNUC__
- #pragma GCC system_header
+#if defined __GNUC__ && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4)
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
#elif defined __SUNPRO_CC
#pragma disable_warn
#elif defined _MSC_VER
diff --git a/connectivity/source/inc/TResultSetHelper.hxx b/connectivity/source/inc/TResultSetHelper.hxx
index 874b9d93d82b..e32e9ed11f4b 100644
--- a/connectivity/source/inc/TResultSetHelper.hxx
+++ b/connectivity/source/inc/TResultSetHelper.hxx
@@ -52,6 +52,9 @@ namespace connectivity
virtual sal_Int32 getDriverPos() const = 0;
virtual sal_Bool deletedVisible() const = 0;
virtual sal_Bool isRowDeleted() const = 0;
+
+ protected:
+ ~IResultSetHelper() {}
};
}
diff --git a/connectivity/source/inc/hsqldb/HConnection.hxx b/connectivity/source/inc/hsqldb/HConnection.hxx
index f86fdb9f4432..1102e7e0d9f2 100644
--- a/connectivity/source/inc/hsqldb/HConnection.hxx
+++ b/connectivity/source/inc/hsqldb/HConnection.hxx
@@ -52,6 +52,9 @@ namespace connectivity
public:
virtual ::osl::Mutex& getMutex() const = 0;
virtual void checkDisposed() const = 0;
+
+ protected:
+ ~IMethodGuardAccess() {}
};
//==========================================================================
diff --git a/connectivity/source/sdbcx/VCollection.cxx b/connectivity/source/sdbcx/VCollection.cxx
index 66ccb4d92df5..c4f76eef2d87 100644
--- a/connectivity/source/sdbcx/VCollection.cxx
+++ b/connectivity/source/sdbcx/VCollection.cxx
@@ -231,7 +231,8 @@ namespace
// -----------------------------------------------------------------------------
};
}
-// -----------------------------------------------------------------------------
+
+IObjectCollection::~IObjectCollection() {}
IMPLEMENT_SERVICE_INFO(OCollection,"com.sun.star.sdbcx.VContainer" , "com.sun.star.sdbcx.Container")