From: Vadim Zeitlin Date: Sat, 8 Oct 2005 16:56:42 +0000 (+0000) Subject: harmless DEC cc warning fixes X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/741d91c5e489871359ed702714714bbb9ceb92b4 harmless DEC cc warning fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35840 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/unix/threadpsx.cpp b/src/unix/threadpsx.cpp index 1a9aaf6cfd..2eb63474f9 100644 --- a/src/unix/threadpsx.cpp +++ b/src/unix/threadpsx.cpp @@ -773,12 +773,21 @@ void *wxThreadInternal::PthreadStart(wxThread *thread) } } - // NB: at least under Linux, pthread_cleanup_push/pop are macros and pop - // contains the matching '}' for the '{' in push, so they must be used - // in the same block! + // NB: pthread_cleanup_push/pop() are macros and pop contains the matching + // '}' for the '{' in push, so they must be used in the same block! #ifdef wxHAVE_PTHREAD_CLEANUP + #ifdef __DECCXX + // under Tru64 we get a warning from macro expansion + #pragma message save + #pragma message disable(declbutnotref) + #endif + // remove the cleanup handler without executing it pthread_cleanup_pop(FALSE); + + #ifdef __DECCXX + #pragma message restore + #endif #endif // wxHAVE_PTHREAD_CLEANUP if ( dontRunAtAll ) @@ -1411,13 +1420,14 @@ wxThreadError wxThread::Kill() default: #ifdef HAVE_PTHREAD_CANCEL if ( pthread_cancel(m_internal->GetId()) != 0 ) -#endif +#endif // HAVE_PTHREAD_CANCEL { wxLogError(_("Failed to terminate a thread.")); return wxTHREAD_MISC_ERROR; } +#ifdef HAVE_PTHREAD_CANCEL if ( m_isDetached ) { // if we use cleanup function, this will be done from @@ -1437,6 +1447,7 @@ wxThreadError wxThread::Kill() } return wxTHREAD_NO_ERROR; +#endif // HAVE_PTHREAD_CANCEL } }