harmless DEC cc warning fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35840 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-10-08 16:56:42 +00:00
parent f1f5039b45
commit 741d91c5e4

View File

@@ -773,12 +773,21 @@ void *wxThreadInternal::PthreadStart(wxThread *thread)
} }
} }
// NB: at least under Linux, pthread_cleanup_push/pop are macros and pop // NB: pthread_cleanup_push/pop() are macros and pop contains the matching
// contains the matching '}' for the '{' in push, so they must be used // '}' for the '{' in push, so they must be used in the same block!
// in the same block!
#ifdef wxHAVE_PTHREAD_CLEANUP #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 // remove the cleanup handler without executing it
pthread_cleanup_pop(FALSE); pthread_cleanup_pop(FALSE);
#ifdef __DECCXX
#pragma message restore
#endif
#endif // wxHAVE_PTHREAD_CLEANUP #endif // wxHAVE_PTHREAD_CLEANUP
if ( dontRunAtAll ) if ( dontRunAtAll )
@@ -1411,13 +1420,14 @@ wxThreadError wxThread::Kill()
default: default:
#ifdef HAVE_PTHREAD_CANCEL #ifdef HAVE_PTHREAD_CANCEL
if ( pthread_cancel(m_internal->GetId()) != 0 ) if ( pthread_cancel(m_internal->GetId()) != 0 )
#endif #endif // HAVE_PTHREAD_CANCEL
{ {
wxLogError(_("Failed to terminate a thread.")); wxLogError(_("Failed to terminate a thread."));
return wxTHREAD_MISC_ERROR; return wxTHREAD_MISC_ERROR;
} }
#ifdef HAVE_PTHREAD_CANCEL
if ( m_isDetached ) if ( m_isDetached )
{ {
// if we use cleanup function, this will be done from // if we use cleanup function, this will be done from
@@ -1437,6 +1447,7 @@ wxThreadError wxThread::Kill()
} }
return wxTHREAD_NO_ERROR; return wxTHREAD_NO_ERROR;
#endif // HAVE_PTHREAD_CANCEL
} }
} }