[Libreoffice-commits] core.git: sal/osl
Tor Lillqvist
tml at collabora.com
Wed Oct 9 04:37:55 PDT 2013
sal/osl/unx/process_impl.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 88fd07d5404ec10fc52373441e67156ea3aea9d3
Author: Tor Lillqvist <tml at collabora.com>
Date: Wed Oct 9 14:15:09 2013 +0300
Use SAL_WARN_IF() instead of assert() so that our Python unit tests don't fail
In some (all?) Python unit tests (or subsequentchecks?)
osl_getCommandArgCount() gets called even if osl_setCommandArgs() hasn't been
called, sigh.
Change-Id: I53ba20806da3168182fd2011397fd29e549869dc
diff --git a/sal/osl/unx/process_impl.cxx b/sal/osl/unx/process_impl.cxx
index 00766cc..b75e772 100644
--- a/sal/osl/unx/process_impl.cxx
+++ b/sal/osl/unx/process_impl.cxx
@@ -176,7 +176,7 @@ sal_uInt32 SAL_CALL osl_getCommandArgCount (void)
sal_uInt32 result = 0;
pthread_mutex_lock (&(g_command_args.m_mutex));
- assert (g_command_args.m_nCount != 0);
+ SAL_WARN_IF (g_command_args.m_nCount == 0, "sal.osl", "osl_setCommandArgs() not called before calling osl_getCommandArgCount()");
if (g_command_args.m_nCount > 0)
result = g_command_args.m_nCount - 1;
pthread_mutex_unlock (&(g_command_args.m_mutex));
More information about the Libreoffice-commits
mailing list