Here is a small contribution I tried for one of the easy hacks.
This code is contributed under the LGPLv3+ / MPL.
From 67b3b38717f788931c7acf44dd7b75d85a3fb713 Mon Sep 17 00:00:00 2001
From: Timothy Markle <tmarkle7@gmail.com>
Date: Fri, 31 Jan 2014 21:17:10 +0100
Subject: [PATCH] fdo#43157 - Clean up OSL_ASSERT
Changed OSL_ASSERT to SAL_WARN_IF
Change-Id: I6f81a265aefe769e1449b1f10c796bf3aa1d0f1c
---
cppu/source/UnsafeBridge/UnsafeBridge.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/cppu/source/UnsafeBridge/UnsafeBridge.cxx b/cppu/source/UnsafeBridge/UnsafeBridge.cxx
index d653a1a..3f3c240 100644
--- a/cppu/source/UnsafeBridge/UnsafeBridge.cxx
+++ b/cppu/source/UnsafeBridge/UnsafeBridge.cxx
@@ -71,7 +71,7 @@ UnsafeBridge::~UnsafeBridge(void)
{
LOG_LIFECYCLE_UnsafeBridge_emit(fprintf(stderr, "LIFE: %s -> %p\n",
"UnsafeBridge::~UnsafeBridge(void)", this));
- OSL_ASSERT(m_count >= 0);
+ SAL_WARN_IF(m_count < 0, "cppu.unsafebridge", "m_count is less than 0");
}
void UnsafeBridge::v_callInto_v(uno_EnvCallee * pCallee, va_list * pParam)
@@ -83,7 +83,7 @@ void UnsafeBridge::v_callInto_v(uno_EnvCallee * pCallee, va_list * pParam)
void UnsafeBridge::v_callOut_v(uno_EnvCallee * pCallee, va_list * pParam)
{
- OSL_ASSERT(m_count > 0);
+ SAL_WARN_IF(m_count <= 0, "cppu.unsafebridge", "m_count is less than or equal to 0");
-- m_count;
pCallee(pParam);
@@ -97,7 +97,7 @@ void UnsafeBridge::v_enter(void)
{
m_mutex.acquire();
- OSL_ASSERT(m_count >= 0);
+ SAL_WARN_IF(m_count < 0, "cppu.unsafebridge", "m_count is less than 0");
if (m_count == 0)
m_threadId = osl::Thread::getCurrentIdentifier();
@@ -107,7 +107,7 @@ void UnsafeBridge::v_enter(void)
void UnsafeBridge::v_leave(void)
{
- OSL_ASSERT(m_count > 0);
+ SAL_WARN_IF(m_count <= 0, "cppu.unsafebridge", "m_count is less than or equal to 0");
-- m_count;
if (!m_count)
--
1.8.3.2
Context
- [PATCH] fdo#43157: Clean up OSL_ASSERT, DBG_ASSERT, etc. · Tim Markle
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.