summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-05-20 15:46:31 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-05-20 15:46:31 +0200
commit92621df9e72b9d4e44e448f92df14c4ba731d5e4 (patch)
treea7f84ca28064335ea233b4c794c5f606ab331cab
parentee212bf4db7e38279d8c236c944ef3e09e3c0b72 (diff)
Revert "fdo#43157 - Clean up OSL_ASSERT, DBG_ASSERT"
This reverts commit 0562a17c64f4016f2d3ba01e1c19c27feadb2543, sal/log.hxx functionality is only available in C++.
-rw-r--r--sal/osl/w32/thread.c16
-rw-r--r--sal/osl/w32/time.c2
2 files changed, 9 insertions, 9 deletions
diff --git a/sal/osl/w32/thread.c b/sal/osl/w32/thread.c
index ac3ddc657608..2eeea0681550 100644
--- a/sal/osl/w32/thread.c
+++ b/sal/osl/w32/thread.c
@@ -73,7 +73,7 @@ static oslThread oslCreateThread(oslWorkerFunction pWorker,
/* alloc mem. for our internal data structure */
pThreadImpl= malloc(sizeof(osl_TThreadImpl));
- SAL_WARN_IF(!pThreadImpl, "sal.osl", "!pThreadImpl - malloc error");
+ OSL_ASSERT(pThreadImpl);
if ( pThreadImpl == 0 )
{
@@ -160,7 +160,7 @@ void SAL_CALL osl_resumeThread(oslThread Thread)
{
osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread;
- SAL_WARN_IF(!pThreadImpl, "sal.osl", "!pThreadImpl - invalid ptr"); /* valid ptr? */
+ OSL_ASSERT(pThreadImpl); /* valid ptr? */
ResumeThread(pThreadImpl->m_hThread);
}
@@ -172,7 +172,7 @@ void SAL_CALL osl_suspendThread(oslThread Thread)
{
osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread;
- SAL_WARN_IF(!pThreadImpl, "sal.osl", "!pThreadImpl - invalid ptr"); /* valid ptr? */
+ OSL_ASSERT(pThreadImpl); /* valid ptr? */
SuspendThread(pThreadImpl->m_hThread);
}
@@ -186,7 +186,7 @@ void SAL_CALL osl_setThreadPriority(oslThread Thread,
int winPriority;
osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread;
- SAL_WARN_IF(!pThreadImpl, "sal.osl", "!pThreadImpl - invalid ptr"); /* valid ptr? */
+ OSL_ASSERT(pThreadImpl); /* valid ptr? */
/* map enum to WIN32 levels
it would be faster and more elegant to preset
@@ -216,13 +216,13 @@ void SAL_CALL osl_setThreadPriority(oslThread Thread,
break;
case osl_Thread_PriorityUnknown:
- SAL_WARN_IF(TRUE, "sal.osl", "Unknown thread priority"); /* only fools try this...*/
+ OSL_ASSERT(FALSE); /* only fools try this...*/
/* let release-version behave friendly */
return;
default:
- SAL_WARN_IF(TRUE, "sal.osl", "Expanded, but forgotten priority"); /* enum expanded, but forgotten here...*/
+ OSL_ASSERT(FALSE); /* enum expanded, but forgotten here...*/
/* let release-version behave friendly */
return;
@@ -281,7 +281,7 @@ oslThreadPriority SAL_CALL osl_getThreadPriority(const oslThread Thread)
break;
default:
- SAL_WARN_IF(TRUE, "sal.osl", "New priority-level needed"); /* WIN32 API changed, incorporate new prio-level! */
+ OSL_ASSERT(FALSE); /* WIN32 API changed, incorporate new prio-level! */
/* release-version behaves friendly */
Priority= osl_Thread_PriorityUnknown;
@@ -442,7 +442,7 @@ static void RemoveKeyFromList( PTLS pTls )
pTls->pPrev->pNext = pTls->pNext;
else
{
- SAL_WARN_IF( pTls != g_pThreadKeyList, "sal.osl", "pTls != g_pThreadKeyList" );
+ OSL_ASSERT( pTls == g_pThreadKeyList );
g_pThreadKeyList = pTls->pNext;
}
diff --git a/sal/osl/w32/time.c b/sal/osl/w32/time.c
index 95f2ec47c486..dd30c44da4e1 100644
--- a/sal/osl/w32/time.c
+++ b/sal/osl/w32/time.c
@@ -35,7 +35,7 @@ sal_Bool SAL_CALL osl_getSystemTime(TimeValue* pTimeVal)
FILETIME CurTime, OffTime;
__int64 Value;
- SAL_WARN_IF(pTimeVal == 0, "sal.osl", "pTimeVal == 0");
+ OSL_ASSERT(pTimeVal != 0);
GetSystemTime(&SystemTime);
SystemTimeToFileTime(&SystemTime, &CurTime);