summaryrefslogtreecommitdiff
path: root/sal/osl/unx/profile.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-03-04 12:05:42 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-03-04 12:05:42 +0100
commit4b47853acc33b7f372fdbf4aad311c3c943cf7fe (patch)
treeef2779c14532d7e241e9501df9851a71a435b34f /sal/osl/unx/profile.cxx
parent78a209b951d2f6e6bb3001b45c242a85fcf9ebb0 (diff)
Clean up a SAL_WARN_IF
Change-Id: I8a945f3e83559f421aa1a0b4fbfcec1b25932ef7
Diffstat (limited to 'sal/osl/unx/profile.cxx')
-rw-r--r--sal/osl/unx/profile.cxx14
1 files changed, 6 insertions, 8 deletions
diff --git a/sal/osl/unx/profile.cxx b/sal/osl/unx/profile.cxx
index 9cbab6be72c2..69e47330b68b 100644
--- a/sal/osl/unx/profile.cxx
+++ b/sal/osl/unx/profile.cxx
@@ -320,19 +320,17 @@ sal_Bool SAL_CALL osl_flushProfile(oslProfile Profile)
static bool writeProfileImpl(osl_TFile* pFile)
{
-#if OSL_DEBUG_LEVEL > 0
- unsigned int nLen=0;
-#endif
-
if ( !( pFile != nullptr && pFile->m_Handle >= 0 ) || ( pFile->m_pWriteBuf == nullptr ) )
{
return false;
}
-#if OSL_DEBUG_LEVEL > 0
- nLen=strlen(pFile->m_pWriteBuf);
- SAL_WARN_IF(nLen != (pFile->m_nWriteBufLen - pFile->m_nWriteBufFree), "sal.osl", "nLen != (pFile->m_nWriteBufLen - pFile->m_nWriteBufFree)");
-#endif
+ SAL_WARN_IF(
+ (strlen(pFile->m_pWriteBuf)
+ != pFile->m_nWriteBufLen - pFile->m_nWriteBufFree),
+ "sal.osl",
+ strlen(pFile->m_pWriteBuf) << " != "
+ << (pFile->m_nWriteBufLen - pFile->m_nWriteBufFree));
if ( !safeWrite(pFile->m_Handle, pFile->m_pWriteBuf, pFile->m_nWriteBufLen - pFile->m_nWriteBufFree) )
{