cppuhelper/source/typeprovider.cxx |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit c876183e4c0aff0fe95145c6ee4a84b213a54190
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Mon Oct 11 17:44:17 2021 +0200
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Mon Oct 11 19:31:42 2021 +0200

    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.st...@allotropia.de>

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)

Reply via email to