Kaydet (Commit) 5c43f54a authored tarafından Stephan Bergmann's avatar Stephan Bergmann

At least GCC 4.5.1 does not allow #pragma GCC diagnostic inside functions.

üst 2af1a973
......@@ -237,6 +237,14 @@ static void osl_thread_cleanup_Impl (void* pData)
/*****************************************************************************/
/* osl_thread_start_Impl */
/*****************************************************************************/
#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
static void* osl_thread_start_Impl (void* pData)
{
int terminate;
......@@ -247,20 +255,7 @@ 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);
......@@ -274,20 +269,7 @@ 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);
}
......@@ -307,6 +289,11 @@ static void* osl_thread_start_Impl (void* pData)
pthread_cleanup_pop (1);
return (0);
}
#if defined __GNUC__
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
#pragma GCC diagnostic pop
#endif
#endif
/*****************************************************************************/
/* osl_thread_create_Impl */
......
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