summaryrefslogtreecommitdiff
path: root/cppuhelper
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2021-10-11 17:44:17 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2021-10-11 19:31:42 +0200
commitc876183e4c0aff0fe95145c6ee4a84b213a54190 (patch)
tree8ccfbe4b1ae67bd1966ddce7f66248dd4c423950 /cppuhelper
parent869e554a017d57da14b0c5b1e1f6ce742db316e0 (diff)
cppuhelper: suppress unhelpful warning C4996
... that happens while implementing the class declared as deprecated with MSVC 2019. cppuhelper/source/typeprovider.cxx(33): warning C4996: 'cppu::OImplementationId': Uses broken double checked locking Change-Id: I469fe38bd276a554b1ef006d3da270b85f26554b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123422 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/source/typeprovider.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/cppuhelper/source/typeprovider.cxx b/cppuhelper/source/typeprovider.cxx
index c4258ef61cc8..c69aa11ab6c9 100644
--- a/cppuhelper/source/typeprovider.cxx
+++ b/cppuhelper/source/typeprovider.cxx
@@ -28,12 +28,21 @@ using namespace com::sun::star::uno;
namespace cppu
{
+// suppress spurious warning triggered by SAL_DEPRECATED in class declaration
+#if defined _MSC_VER && !defined __clang__
+#pragma warning(push)
+#pragma warning(disable: 4996)
+#endif
OImplementationId::~OImplementationId()
{
delete _pSeq;
}
+#if defined _MSC_VER && !defined __clang__
+#pragma warning(pop)
+#endif
+
Sequence< sal_Int8 > OImplementationId::getImplementationId() const
{
if (! _pSeq)