Kaydet (Commit) 8ee1a76b authored tarafından Stephan Bergmann's avatar Stephan Bergmann

-Werror=shadow and -Werror=sign-promo fixes

üst f233f397
......@@ -247,7 +247,20 @@ static void* osl_thread_start_Impl (void* pData)
pthread_mutex_lock (&(pImpl->m_Lock));
/* install cleanup handler */
#if defined __GNUC__
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
#pragma GCC diagnostic push
#endif
#pragma GCC diagnostic ignored "-Wshadow"
#endif
#endif
pthread_cleanup_push (osl_thread_cleanup_Impl, pData);
#if defined __GNUC__
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
#pragma GCC diagnostic pop
#endif
#endif
/* request oslThreadIdentifier @@@ see TODO @@@ */
pImpl->m_Ident = insertThreadId (pImpl->m_hThread);
......@@ -261,7 +274,20 @@ static void* osl_thread_start_Impl (void* pData)
while (pImpl->m_Flags & THREADIMPL_FLAGS_SUSPENDED)
{
/* wait until SUSPENDED flag is cleared */
#if defined __GNUC__
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
#pragma GCC diagnostic push
#endif
#pragma GCC diagnostic ignored "-Wshadow"
#endif
#endif
pthread_cleanup_push (osl_thread_wait_cleanup_Impl, &(pImpl->m_Lock));
#if defined __GNUC__
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
#pragma GCC diagnostic pop
#endif
#endif
pthread_cond_wait (&(pImpl->m_Cond), &(pImpl->m_Lock));
pthread_cleanup_pop (0);
}
......
......@@ -45,15 +45,15 @@
* osl_getSystemTime
*-------------------------------------------------*/
sal_Bool SAL_CALL osl_getSystemTime(TimeValue* TimeValue)
sal_Bool SAL_CALL osl_getSystemTime(TimeValue* tv)
{
struct timeval tp;
/* FIXME: use higher resolution */
gettimeofday(&tp, NULL);
TimeValue->Seconds = tp.tv_sec;
TimeValue->Nanosec = tp.tv_usec * 1000;
tv->Seconds = tp.tv_sec;
tv->Nanosec = tp.tv_usec * 1000;
return (sal_True);
}
......
......@@ -185,7 +185,7 @@ void init() {
{
SAL_WARN(
"sal",
"Couldn't open logfile " << o << '(' << e << ')');
"Couldn't open logfile " << o << '(' << +e << ')');
}
}
g_bHasBeenCalled = sal_True;
......
......@@ -119,12 +119,10 @@ sal_Size ImplConvertBig5HkscsToUnicode(ImplTextConverterData const * pData,
}
if (nUnicode == 0xFFFF)
{
sal_uInt32 nFirst = pBig5Data[nRow].mnTrailStart;
if (nChar >= nFirst
&& nChar <= pBig5Data[nRow].mnTrailEnd)
sal_uInt32 n = pBig5Data[nRow].mnTrailStart;
if (nChar >= n && nChar <= pBig5Data[nRow].mnTrailEnd)
{
nUnicode
= pBig5Data[nRow].mpToUniTrailTab[nChar - nFirst];
nUnicode = pBig5Data[nRow].mpToUniTrailTab[nChar - n];
if (nUnicode == 0)
nUnicode = 0xFFFF;
OSL_VERIFY(!ImplIsHighSurrogate(nUnicode));
......
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