Kaydet (Commit) 92621df9 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Revert "fdo#43157 - Clean up OSL_ASSERT, DBG_ASSERT"

This reverts commit 0562a17c,
sal/log.hxx functionality is only available in C++.
üst ee212bf4
...@@ -73,7 +73,7 @@ static oslThread oslCreateThread(oslWorkerFunction pWorker, ...@@ -73,7 +73,7 @@ static oslThread oslCreateThread(oslWorkerFunction pWorker,
/* alloc mem. for our internal data structure */ /* alloc mem. for our internal data structure */
pThreadImpl= malloc(sizeof(osl_TThreadImpl)); pThreadImpl= malloc(sizeof(osl_TThreadImpl));
SAL_WARN_IF(!pThreadImpl, "sal.osl", "!pThreadImpl - malloc error"); OSL_ASSERT(pThreadImpl);
if ( pThreadImpl == 0 ) if ( pThreadImpl == 0 )
{ {
...@@ -160,7 +160,7 @@ void SAL_CALL osl_resumeThread(oslThread Thread) ...@@ -160,7 +160,7 @@ void SAL_CALL osl_resumeThread(oslThread Thread)
{ {
osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)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); ResumeThread(pThreadImpl->m_hThread);
} }
...@@ -172,7 +172,7 @@ void SAL_CALL osl_suspendThread(oslThread Thread) ...@@ -172,7 +172,7 @@ void SAL_CALL osl_suspendThread(oslThread Thread)
{ {
osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)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); SuspendThread(pThreadImpl->m_hThread);
} }
...@@ -186,7 +186,7 @@ void SAL_CALL osl_setThreadPriority(oslThread Thread, ...@@ -186,7 +186,7 @@ void SAL_CALL osl_setThreadPriority(oslThread Thread,
int winPriority; int winPriority;
osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread; 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 /* map enum to WIN32 levels
it would be faster and more elegant to preset it would be faster and more elegant to preset
...@@ -216,13 +216,13 @@ void SAL_CALL osl_setThreadPriority(oslThread Thread, ...@@ -216,13 +216,13 @@ void SAL_CALL osl_setThreadPriority(oslThread Thread,
break; break;
case osl_Thread_PriorityUnknown: 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 */ /* let release-version behave friendly */
return; return;
default: 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 */ /* let release-version behave friendly */
return; return;
...@@ -281,7 +281,7 @@ oslThreadPriority SAL_CALL osl_getThreadPriority(const oslThread Thread) ...@@ -281,7 +281,7 @@ oslThreadPriority SAL_CALL osl_getThreadPriority(const oslThread Thread)
break; break;
default: 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 */ /* release-version behaves friendly */
Priority= osl_Thread_PriorityUnknown; Priority= osl_Thread_PriorityUnknown;
...@@ -442,7 +442,7 @@ static void RemoveKeyFromList( PTLS pTls ) ...@@ -442,7 +442,7 @@ static void RemoveKeyFromList( PTLS pTls )
pTls->pPrev->pNext = pTls->pNext; pTls->pPrev->pNext = pTls->pNext;
else else
{ {
SAL_WARN_IF( pTls != g_pThreadKeyList, "sal.osl", "pTls != g_pThreadKeyList" ); OSL_ASSERT( pTls == g_pThreadKeyList );
g_pThreadKeyList = pTls->pNext; g_pThreadKeyList = pTls->pNext;
} }
......
...@@ -35,7 +35,7 @@ sal_Bool SAL_CALL osl_getSystemTime(TimeValue* pTimeVal) ...@@ -35,7 +35,7 @@ sal_Bool SAL_CALL osl_getSystemTime(TimeValue* pTimeVal)
FILETIME CurTime, OffTime; FILETIME CurTime, OffTime;
__int64 Value; __int64 Value;
SAL_WARN_IF(pTimeVal == 0, "sal.osl", "pTimeVal == 0"); OSL_ASSERT(pTimeVal != 0);
GetSystemTime(&SystemTime); GetSystemTime(&SystemTime);
SystemTimeToFileTime(&SystemTime, &CurTime); SystemTimeToFileTime(&SystemTime, &CurTime);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment