more Sun C++ compiler warning fixes: in particular, added an ugly but

necessary workaround for avoiding warning in the .xpm files


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13516 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-01-11 19:33:37 +00:00
parent 40325b2630
commit 295272bdcd
17 changed files with 116 additions and 66 deletions

View File

@@ -490,13 +490,19 @@ void wxCondition::Broadcast()
// wxThread (Posix implementation)
//--------------------------------------------------------------------
// the thread callback functions must have the C linkage
extern "C"
{
#if HAVE_THREAD_CLEANUP_FUNCTIONS
// thread exit function
extern "C" void wxPthreadCleanup(void *ptr);
// thread exit function
void wxPthreadCleanup(void *ptr);
#endif // HAVE_THREAD_CLEANUP_FUNCTIONS
void *wxPthreadStart(void *ptr);
} // extern "C"
class wxThreadInternal
{
public:
@@ -504,7 +510,7 @@ public:
~wxThreadInternal();
// thread entry function
static void *PthreadStart(void *ptr);
static void *PthreadStart(wxThread *thread);
// thread actions
// start the thread
@@ -600,9 +606,13 @@ private:
// thread startup and exit functions
// ----------------------------------------------------------------------------
void *wxThreadInternal::PthreadStart(void *ptr)
void *wxPthreadStart(void *ptr)
{
return wxThreadInternal::PthreadStart((wxThread *)ptr);
}
void *wxThreadInternal::PthreadStart(wxThread *thread)
{
wxThread *thread = (wxThread *)ptr;
wxThreadInternal *pthread = thread->m_internal;
// associate the thread pointer with the newly created thread so that
@@ -622,7 +632,7 @@ void *wxThreadInternal::PthreadStart(void *ptr)
#if HAVE_THREAD_CLEANUP_FUNCTIONS
// install the cleanup handler which will be called if the thread is
// cancelled
pthread_cleanup_push(wxPthreadCleanup, ptr);
pthread_cleanup_push(wxPthreadCleanup, thread);
#endif // HAVE_THREAD_CLEANUP_FUNCTIONS
// wait for the condition to be signaled from Run()
@@ -1042,7 +1052,7 @@ wxThreadError wxThread::Create(unsigned int WXUNUSED(stackSize))
(
m_internal->GetIdPtr(),
&attr,
wxThreadInternal::PthreadStart,
wxPthreadStart,
(void *)this
);