diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2011-12-19 10:59:25 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2011-12-19 11:00:03 +0100 |
commit | 8ee1a76b735acd39861f13a0dbb9c56f8eec96f4 (patch) | |
tree | 2fd0c0481d26908460df741dab864e55f890331f /sal/osl | |
parent | f233f3973631c664e0953f04f88a58234390c088 (diff) |
-Werror=shadow and -Werror=sign-promo fixes
Diffstat (limited to 'sal/osl')
-rw-r--r-- | sal/osl/unx/thread.c | 26 | ||||
-rw-r--r-- | sal/osl/unx/time.c | 6 |
2 files changed, 29 insertions, 3 deletions
diff --git a/sal/osl/unx/thread.c b/sal/osl/unx/thread.c index 520274305ed4..766cf0615244 100644 --- a/sal/osl/unx/thread.c +++ b/sal/osl/unx/thread.c @@ -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); } diff --git a/sal/osl/unx/time.c b/sal/osl/unx/time.c index 31530be2195f..602fe64593c0 100644 --- a/sal/osl/unx/time.c +++ b/sal/osl/unx/time.c @@ -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); } |