diff options
author | Tor Lillqvist <tml@collabora.com> | 2013-10-09 14:15:09 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2013-10-09 14:36:57 +0300 |
commit | 88fd07d5404ec10fc52373441e67156ea3aea9d3 (patch) | |
tree | ad725df7bf0c0c2802006916e62bdb509a6d0969 | |
parent | 9c5a34edeee63c4d512bb47d116313469bba960d (diff) |
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
-rw-r--r-- | sal/osl/unx/process_impl.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sal/osl/unx/process_impl.cxx b/sal/osl/unx/process_impl.cxx index 00766ccf4304..b75e7725b2e0 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)); |