From c876183e4c0aff0fe95145c6ee4a84b213a54190 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 11 Oct 2021 17:44:17 +0200 Subject: 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 --- cppuhelper/source/typeprovider.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'cppuhelper') 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) -- cgit