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:
@@ -99,16 +99,16 @@ public :
|
||||
wxInt32 m_y;
|
||||
};
|
||||
|
||||
wxPoint2DInt operator+(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2);
|
||||
wxPoint2DInt operator-(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2);
|
||||
wxPoint2DInt operator*(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2);
|
||||
wxPoint2DInt operator*(wxInt32 n , const wxPoint2DInt& pt);
|
||||
wxPoint2DInt operator*(wxInt32 n , const wxPoint2DInt& pt);
|
||||
wxPoint2DInt operator*(const wxPoint2DInt& pt , wxInt32 n);
|
||||
wxPoint2DInt operator*(const wxPoint2DInt& pt , wxInt32 n);
|
||||
wxPoint2DInt operator/(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2);
|
||||
wxPoint2DInt operator/(const wxPoint2DInt& pt , wxInt32 n);
|
||||
wxPoint2DInt operator/(const wxPoint2DInt& pt , wxInt32 n);
|
||||
inline wxPoint2DInt operator+(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2);
|
||||
inline wxPoint2DInt operator-(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2);
|
||||
inline wxPoint2DInt operator*(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2);
|
||||
inline wxPoint2DInt operator*(wxInt32 n , const wxPoint2DInt& pt);
|
||||
inline wxPoint2DInt operator*(wxInt32 n , const wxPoint2DInt& pt);
|
||||
inline wxPoint2DInt operator*(const wxPoint2DInt& pt , wxInt32 n);
|
||||
inline wxPoint2DInt operator*(const wxPoint2DInt& pt , wxInt32 n);
|
||||
inline wxPoint2DInt operator/(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2);
|
||||
inline wxPoint2DInt operator/(const wxPoint2DInt& pt , wxInt32 n);
|
||||
inline wxPoint2DInt operator/(const wxPoint2DInt& pt , wxInt32 n);
|
||||
|
||||
inline wxPoint2DInt::wxPoint2DInt()
|
||||
{
|
||||
|
@@ -567,7 +567,6 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
|
||||
|
||||
/* Expand ~ and ~user */
|
||||
nm = lnm;
|
||||
s = wxT("");
|
||||
if (nm[0] == wxT('~') && !q)
|
||||
{
|
||||
/* prefix ~ */
|
||||
@@ -591,7 +590,7 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
|
||||
if ((home = WXSTRINGCAST wxGetUserHome(wxString(nm + 1))) == NULL) {
|
||||
if (was_sep) /* replace only if it was there: */
|
||||
*s = SEP;
|
||||
s = wxT("");
|
||||
s = NULL;
|
||||
} else {
|
||||
nm = nnm;
|
||||
s = home;
|
||||
|
@@ -205,11 +205,11 @@ bool wxHTTP::Connect(wxSockAddress& addr, bool WXUNUSED(wait))
|
||||
|
||||
bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req)
|
||||
{
|
||||
wxChar *tmp_buf;
|
||||
const wxChar *request;
|
||||
|
||||
switch (req) {
|
||||
case wxHTTP_GET:
|
||||
tmp_buf = wxT("GET");
|
||||
request = wxT("GET");
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
@@ -224,7 +224,7 @@ bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req)
|
||||
Notify(FALSE);
|
||||
|
||||
wxString buf;
|
||||
buf.Printf(wxT("%s %s HTTP/1.0\r\n"), tmp_buf, path.c_str());
|
||||
buf.Printf(wxT("%s %s HTTP/1.0\r\n"), request, path.c_str());
|
||||
const wxWX2MBbuf pathbuf = wxConvLibc.cWX2MB(buf);
|
||||
Write(pathbuf, strlen(wxMBSTRINGCAST pathbuf));
|
||||
SendHeaders();
|
||||
|
@@ -69,6 +69,9 @@
|
||||
# include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
// XPM hack: make the arrays const
|
||||
#define static static const
|
||||
|
||||
#ifndef __DOS__
|
||||
#include "wx/generic/home.xpm"
|
||||
#endif
|
||||
@@ -80,6 +83,8 @@
|
||||
#include "wx/generic/deffile.xpm"
|
||||
#include "wx/generic/exefile.xpm"
|
||||
|
||||
#undef static
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxFileData
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@@ -58,11 +58,16 @@
|
||||
// XPMs
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// XPM hack: make the arrays const
|
||||
#define static static const
|
||||
|
||||
#ifndef __WXMSW__
|
||||
#include "wx/generic/cross.xpm"
|
||||
#include "wx/generic/tick.xpm"
|
||||
#endif
|
||||
|
||||
#undef static
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// accessor functions for the bitmaps (may return NULL, check for it!)
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -198,7 +198,13 @@ wxTipDialog::wxTipDialog(wxWindow *parent,
|
||||
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||
wxIcon icon("wxICON_TIP");
|
||||
#else
|
||||
// XPM hack: make the arrays const
|
||||
#define static static const
|
||||
|
||||
#include "wx/generic/tip.xpm"
|
||||
|
||||
#undef static
|
||||
|
||||
wxIcon icon(tipIcon);
|
||||
#endif
|
||||
wxStaticBitmap *bmp = new wxStaticBitmap(this, -1, icon);
|
||||
|
@@ -868,11 +868,16 @@ int wxEntry( int argc, char *argv[] )
|
||||
|
||||
#ifndef __WXUNIVERSAL__
|
||||
|
||||
// XPM hack: make the arrays const
|
||||
#define static static const
|
||||
|
||||
#include "wx/gtk/info.xpm"
|
||||
#include "wx/gtk/error.xpm"
|
||||
#include "wx/gtk/question.xpm"
|
||||
#include "wx/gtk/warning.xpm"
|
||||
|
||||
#undef static
|
||||
|
||||
wxIcon wxApp::GetStdIcon(int which) const
|
||||
{
|
||||
switch(which)
|
||||
|
@@ -84,7 +84,7 @@ struct wxlistbox_idle_struct
|
||||
gint m_tag;
|
||||
};
|
||||
|
||||
static gint wxlistbox_idle_callback( gpointer gdata )
|
||||
extern "C" gint wxlistbox_idle_callback( gpointer gdata )
|
||||
{
|
||||
wxlistbox_idle_struct* data = (wxlistbox_idle_struct*) gdata;
|
||||
gdk_threads_enter();
|
||||
|
@@ -3755,7 +3755,7 @@ static void SetInvokingWindow( wxMenu *menu, wxWindowGTK *win )
|
||||
static gint gs_pop_x = 0;
|
||||
static gint gs_pop_y = 0;
|
||||
|
||||
static void wxPopupMenuPositionCallback( GtkMenu *menu,
|
||||
extern "C" void wxPopupMenuPositionCallback( GtkMenu *menu,
|
||||
gint *x, gint *y,
|
||||
gpointer WXUNUSED(user_data) )
|
||||
{
|
||||
|
@@ -868,11 +868,16 @@ int wxEntry( int argc, char *argv[] )
|
||||
|
||||
#ifndef __WXUNIVERSAL__
|
||||
|
||||
// XPM hack: make the arrays const
|
||||
#define static static const
|
||||
|
||||
#include "wx/gtk/info.xpm"
|
||||
#include "wx/gtk/error.xpm"
|
||||
#include "wx/gtk/question.xpm"
|
||||
#include "wx/gtk/warning.xpm"
|
||||
|
||||
#undef static
|
||||
|
||||
wxIcon wxApp::GetStdIcon(int which) const
|
||||
{
|
||||
switch(which)
|
||||
|
@@ -84,7 +84,7 @@ struct wxlistbox_idle_struct
|
||||
gint m_tag;
|
||||
};
|
||||
|
||||
static gint wxlistbox_idle_callback( gpointer gdata )
|
||||
extern "C" gint wxlistbox_idle_callback( gpointer gdata )
|
||||
{
|
||||
wxlistbox_idle_struct* data = (wxlistbox_idle_struct*) gdata;
|
||||
gdk_threads_enter();
|
||||
|
@@ -3755,7 +3755,7 @@ static void SetInvokingWindow( wxMenu *menu, wxWindowGTK *win )
|
||||
static gint gs_pop_x = 0;
|
||||
static gint gs_pop_y = 0;
|
||||
|
||||
static void wxPopupMenuPositionCallback( GtkMenu *menu,
|
||||
extern "C" void wxPopupMenuPositionCallback( GtkMenu *menu,
|
||||
gint *x, gint *y,
|
||||
gpointer WXUNUSED(user_data) )
|
||||
{
|
||||
|
@@ -55,24 +55,28 @@
|
||||
// Bitmaps:
|
||||
|
||||
#ifndef __WXMSW__
|
||||
#include "bitmaps/wpanel.xpm"
|
||||
#include "bitmaps/wback.xpm"
|
||||
#include "bitmaps/wforward.xpm"
|
||||
#include "bitmaps/wbook.xpm"
|
||||
#include "bitmaps/woptions.xpm"
|
||||
#include "bitmaps/wfolder.xpm"
|
||||
#include "bitmaps/wpage.xpm"
|
||||
#include "bitmaps/whelp.xpm"
|
||||
#include "bitmaps/whlproot.xpm"
|
||||
#include "bitmaps/wbkadd.xpm"
|
||||
#include "bitmaps/wbkdel.xpm"
|
||||
#include "bitmaps/wup.xpm"
|
||||
#include "bitmaps/wupnode.xpm"
|
||||
#include "bitmaps/wdown.xpm"
|
||||
#include "bitmaps/wopen.xpm"
|
||||
#include "bitmaps/wprint.xpm"
|
||||
#endif
|
||||
// XPM hack: make the arrays const
|
||||
#define static static const
|
||||
|
||||
#include "bitmaps/wpanel.xpm"
|
||||
#include "bitmaps/wback.xpm"
|
||||
#include "bitmaps/wforward.xpm"
|
||||
#include "bitmaps/wbook.xpm"
|
||||
#include "bitmaps/woptions.xpm"
|
||||
#include "bitmaps/wfolder.xpm"
|
||||
#include "bitmaps/wpage.xpm"
|
||||
#include "bitmaps/whelp.xpm"
|
||||
#include "bitmaps/whlproot.xpm"
|
||||
#include "bitmaps/wbkadd.xpm"
|
||||
#include "bitmaps/wbkdel.xpm"
|
||||
#include "bitmaps/wup.xpm"
|
||||
#include "bitmaps/wupnode.xpm"
|
||||
#include "bitmaps/wdown.xpm"
|
||||
#include "bitmaps/wopen.xpm"
|
||||
#include "bitmaps/wprint.xpm"
|
||||
|
||||
#undef static
|
||||
#endif // __WXMSW__
|
||||
|
||||
// what is considered "small index"?
|
||||
#define INDEX_IS_SMALL 100
|
||||
|
@@ -42,12 +42,17 @@ file is only left to point out the problem and will be removed r.s.n.
|
||||
// Bitmaps:
|
||||
|
||||
#ifndef __WXMSW__
|
||||
#include "bitmaps/panel.xpm"
|
||||
#include "bitmaps/back.xpm"
|
||||
#include "bitmaps/forward.xpm"
|
||||
#include "bitmaps/book.xpm"
|
||||
#include "bitmaps/folder.xpm"
|
||||
#include "bitmaps/page.xpm"
|
||||
// XPM hack: make the arrays const
|
||||
#define static static const
|
||||
|
||||
#include "bitmaps/panel.xpm"
|
||||
#include "bitmaps/back.xpm"
|
||||
#include "bitmaps/forward.xpm"
|
||||
#include "bitmaps/book.xpm"
|
||||
#include "bitmaps/folder.xpm"
|
||||
#include "bitmaps/page.xpm"
|
||||
|
||||
#undef static
|
||||
#endif
|
||||
|
||||
#include "search.h"
|
||||
@@ -378,10 +383,11 @@ class MyProgressDlg : public wxDialog
|
||||
_("Searching..."),
|
||||
wxPoint(0, 0),
|
||||
#ifdef __WXGTK__
|
||||
wxSize(300, 110))
|
||||
wxSize(300, 110)
|
||||
#else
|
||||
wxSize(300, 130))
|
||||
wxSize(300, 130)
|
||||
#endif
|
||||
)
|
||||
{m_Canceled = FALSE;}
|
||||
void OnCancel(wxCommandEvent& event) {m_Canceled = TRUE;}
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
@@ -753,11 +753,16 @@ bool wxApp::Yield(bool onlyIfNeeded)
|
||||
|
||||
// TODO use XmGetPixmap (?) to get the really standard icons!
|
||||
|
||||
// XPM hack: make the arrays const
|
||||
#define static static const
|
||||
|
||||
#include "wx/generic/info.xpm"
|
||||
#include "wx/generic/error.xpm"
|
||||
#include "wx/generic/question.xpm"
|
||||
#include "wx/generic/warning.xpm"
|
||||
|
||||
#undef static
|
||||
|
||||
wxIcon
|
||||
wxApp::GetStdIcon(int which) const
|
||||
{
|
||||
|
@@ -196,10 +196,10 @@ wxString wxNativeFontInfo::ToUserString() const
|
||||
return GetXFontName();
|
||||
}
|
||||
|
||||
bool wxNativeFontInfo::FromXFontName(const wxString& xFontName)
|
||||
bool wxNativeFontInfo::FromXFontName(const wxString& fontname)
|
||||
{
|
||||
// TODO: we should be able to handle the font aliases here, but how?
|
||||
wxStringTokenizer tokenizer(xFontName, _T("-"), wxTOKEN_STRTOK);
|
||||
wxStringTokenizer tokenizer(fontname, _T("-"), wxTOKEN_STRTOK);
|
||||
|
||||
for ( size_t n = 0; n < WXSIZEOF(fontElements); n++ )
|
||||
{
|
||||
|
@@ -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
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user