dbaccess/source/ui/dlg/adminpages.hxx | 1 + dbaccess/source/ui/misc/dsmeta.cxx | 1 + include/comphelper/singletonref.hxx | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-)
New commits: commit 6c0db491f000c55e6bf6061d33ba2312b0ec303f Author: Gabor Kelemen <[email protected]> AuthorDate: Sat May 25 12:54:52 2024 +0200 Commit: Gabor Kelemen <[email protected]> CommitDate: Sat Jul 20 12:34:57 2024 +0200 tdf#43157 Use SAL_WARN_IF instead of OSL_ENSURE Change-Id: Id4674025a6abcacd5a8096630908c3e2f7a2821c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168129 Reviewed-by: Gabor Kelemen <[email protected]> Tested-by: Jenkins diff --git a/dbaccess/source/ui/dlg/adminpages.hxx b/dbaccess/source/ui/dlg/adminpages.hxx index 7d13a3886e44..b3bb07274d59 100644 --- a/dbaccess/source/ui/dlg/adminpages.hxx +++ b/dbaccess/source/ui/dlg/adminpages.hxx @@ -19,6 +19,7 @@ #pragma once +#include <osl/diagnose.h> #include <sfx2/tabdlg.hxx> #include <vcl/wizardmachine.hxx> #include <curledit.hxx> diff --git a/dbaccess/source/ui/misc/dsmeta.cxx b/dbaccess/source/ui/misc/dsmeta.cxx index 9790e6cdc405..c25fb8eda16a 100644 --- a/dbaccess/source/ui/misc/dsmeta.cxx +++ b/dbaccess/source/ui/misc/dsmeta.cxx @@ -21,6 +21,7 @@ #include <connectivity/DriversConfig.hxx> #include <dsntypes.hxx> #include <comphelper/processfactory.hxx> +#include <osl/diagnose.h> #include <map> #include <utility> diff --git a/include/comphelper/singletonref.hxx b/include/comphelper/singletonref.hxx index 5a9da0903981..f1b312f13f43 100644 --- a/include/comphelper/singletonref.hxx +++ b/include/comphelper/singletonref.hxx @@ -19,7 +19,7 @@ #pragma once #include <sal/config.h> -#include <osl/diagnose.h> +#include <sal/log.hxx> #include <mutex> namespace comphelper @@ -89,8 +89,8 @@ public: if (m_nRef == 1) m_pInstance = new SingletonClass(); - OSL_ENSURE(m_nRef > 0 && m_pInstance, - "Race? Ref count of singleton >0, but instance is NULL!"); + SAL_WARN_IF(!(m_nRef > 0 && m_pInstance), "comphelper", + "Race? Ref count of singleton >0, but instance is NULL!"); // <- GLOBAL SAFE }
