Updates to fix Watcom C/C++ 11.0 compiler warning problems. Now compiles
clean with this compiler. Hopefully I did this without breaking other compilers. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -561,7 +561,7 @@ public:
|
||||
wxDateTime_t millisec = 0);
|
||||
// from separate values for each component with explicit date
|
||||
inline wxDateTime(wxDateTime_t day, // day of the month
|
||||
Month month = Inv_Month,
|
||||
Month month,
|
||||
int year = Inv_Year, // 1999, not 99 please!
|
||||
wxDateTime_t hour = 0,
|
||||
wxDateTime_t minute = 0,
|
||||
@@ -604,7 +604,7 @@ public:
|
||||
// from separate values for each component with explicit date
|
||||
// (defaults for month and year are the current values)
|
||||
wxDateTime& Set(wxDateTime_t day,
|
||||
Month month = Inv_Month,
|
||||
Month month,
|
||||
int year = Inv_Year, // 1999, not 99 please!
|
||||
wxDateTime_t hour = 0,
|
||||
wxDateTime_t minute = 0,
|
||||
|
@@ -44,7 +44,7 @@ public:
|
||||
|
||||
virtual ~wxDrawObject() { }
|
||||
|
||||
virtual void Draw(wxDCBase& dc) const { }
|
||||
virtual void Draw(wxDCBase&) const { }
|
||||
|
||||
virtual void CalcBoundingBox(wxCoord x, wxCoord y)
|
||||
{
|
||||
|
@@ -119,7 +119,6 @@
|
||||
#elif defined(__BCPLUSPLUS__) && !defined(__BORLANDC__)
|
||||
#define __BORLANDC__
|
||||
#elif defined(__WATCOMC__)
|
||||
//#define __WATCOMC__
|
||||
#elif defined(__SC__)
|
||||
#define __SYMANTECC__
|
||||
#endif // compiler
|
||||
@@ -148,6 +147,12 @@
|
||||
#endif
|
||||
#endif // __VISUALC__
|
||||
|
||||
// suppress some Watcom C++ warnings
|
||||
#ifdef __WATCOMC__
|
||||
# pragma warning 849 9 // Disable 'virtual function hidden'
|
||||
# pragma warning 549 9 // Disable 'operand contains compiler generated information'
|
||||
#endif // __VISUALC__
|
||||
|
||||
// suppress some Salford C++ warnings
|
||||
#ifdef __SALFORDC__
|
||||
# pragma suppress 353 // Possible nested comments
|
||||
@@ -414,8 +419,8 @@ typedef int wxWindowID;
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
|
||||
// __declspec works in BC++ 5 and later, as well as VC++ and gcc
|
||||
#if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__GNUC__)
|
||||
// __declspec works in BC++ 5 and later, Watcom C++ 11.0 and later as well as VC++ and gcc
|
||||
#if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__GNUC__) || defined(__WATCOMC__)
|
||||
# ifdef WXMAKINGDLL
|
||||
# define WXDLLEXPORT __declspec( dllexport )
|
||||
# define WXDLLEXPORT_DATA(type) __declspec( dllexport ) type
|
||||
@@ -477,8 +482,10 @@ typedef int wxWindowID;
|
||||
# define WXDLLIMPORT
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
class WXDLLEXPORT wxObject;
|
||||
class WXDLLEXPORT wxEvent;
|
||||
#endif
|
||||
|
||||
/** symbolic constant used by all Find()-like functions returning positive
|
||||
integer on success as failure indicator */
|
||||
@@ -489,7 +496,9 @@ class WXDLLEXPORT wxEvent;
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// everybody gets the assert and other debug macros
|
||||
#ifdef __cplusplus
|
||||
#include "wx/debug.h"
|
||||
#endif
|
||||
|
||||
//@{
|
||||
/// delete pointer if it is not NULL and NULL it afterwards
|
||||
@@ -558,7 +567,9 @@ class WXDLLEXPORT wxEvent;
|
||||
#endif
|
||||
|
||||
// Callback function type definition
|
||||
#ifdef __cplusplus
|
||||
typedef void (*wxFunction) (wxObject&, wxEvent&);
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// OS mnemonics -- Identify the running OS (useful for Windows)
|
||||
|
@@ -1575,7 +1575,7 @@ public:
|
||||
wxObject *userData = (wxObject *) NULL )
|
||||
{ Connect(id, -1, eventType, func, userData); }
|
||||
|
||||
bool Disconnect( int id, int lastId = -1, wxEventType eventType = wxEVT_NULL,
|
||||
bool Disconnect( int id, int lastId, wxEventType eventType,
|
||||
wxObjectEventFunction func = NULL,
|
||||
wxObject *userData = (wxObject *) NULL );
|
||||
|
||||
|
@@ -190,7 +190,7 @@ public:
|
||||
|
||||
// Create a drag image from a bitmap and optional cursor
|
||||
bool Create(const wxBitmap& image, const wxCursor& cursor = wxNullCursor);
|
||||
bool Create(const wxBitmap& image, const wxCursor& cursor, const wxPoint& cursorHotspot)
|
||||
bool Create(const wxBitmap& image, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot))
|
||||
{
|
||||
wxLogDebug(wxT("wxDragImage::Create: use of a cursor hotspot is now deprecated. Please omit this argument."));
|
||||
return Create(image, cursor);
|
||||
@@ -198,7 +198,7 @@ public:
|
||||
|
||||
// Create a drag image from an icon and optional cursor
|
||||
bool Create(const wxIcon& image, const wxCursor& cursor = wxNullCursor);
|
||||
bool Create(const wxIcon& image, const wxCursor& cursor, const wxPoint& cursorHotspot)
|
||||
bool Create(const wxIcon& image, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot))
|
||||
{
|
||||
wxLogDebug(wxT("wxDragImage::Create: use of a cursor hotspot is now deprecated. Please omit this argument."));
|
||||
return Create(image, cursor);
|
||||
@@ -206,7 +206,7 @@ public:
|
||||
|
||||
// Create a drag image from a string and optional cursor
|
||||
bool Create(const wxString& str, const wxCursor& cursor = wxNullCursor);
|
||||
bool Create(const wxString& str, const wxCursor& cursor, const wxPoint& cursorHotspot)
|
||||
bool Create(const wxString& str, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot))
|
||||
{
|
||||
wxLogDebug(wxT("wxDragImage::Create: use of a cursor hotspot is now deprecated. Please omit this argument."));
|
||||
return Create(str, cursor);
|
||||
|
@@ -55,7 +55,7 @@ public:
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
long style = 0,
|
||||
long style,
|
||||
const wxString& name = wxPanelNameStr);
|
||||
|
||||
// Create status line
|
||||
|
@@ -2,7 +2,7 @@
|
||||
// Name: treelay.h
|
||||
// Purpose: wxTreeLayout class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Modified by:
|
||||
// Created: 7/4/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1998 Julian Smart
|
||||
@@ -24,7 +24,7 @@ class WXDLLEXPORT wxTreeLayout: public wxObject
|
||||
|
||||
public:
|
||||
wxTreeLayout();
|
||||
|
||||
|
||||
// Redefine these
|
||||
virtual void GetChildren(long id, wxList& list) = 0;
|
||||
virtual long GetNextNode(long id) = 0;
|
||||
@@ -35,21 +35,21 @@ public:
|
||||
virtual void SetNodeY(long id, long y) = 0;
|
||||
virtual void ActivateNode(long id, bool active) = 0;
|
||||
virtual bool NodeActive(long id) = 0;
|
||||
|
||||
|
||||
// Optional redefinition
|
||||
void Initialize(void);
|
||||
inline virtual void SetNodeName(long id, const wxString& name) {}
|
||||
inline virtual wxString GetNodeName(long id) { return wxString(""); }
|
||||
inline virtual void SetNodeName(long WXUNUSED(id), const wxString& WXUNUSED(name)) {}
|
||||
inline virtual wxString GetNodeName(long WXUNUSED(id)) { return wxString(""); }
|
||||
virtual void GetNodeSize(long id, long *x, long *y, wxDC& dc);
|
||||
virtual void Draw(wxDC& dc);
|
||||
virtual void DrawNodes(wxDC& dc);
|
||||
virtual void DrawBranches(wxDC& dc);
|
||||
virtual void DrawNode(long id, wxDC& dc);
|
||||
virtual void DrawBranch(long from, long to, wxDC& dc);
|
||||
|
||||
|
||||
// Don't redefine
|
||||
virtual void DoLayout(wxDC& dc, long topNode = -1);
|
||||
|
||||
|
||||
// Accessors -- don't redefine
|
||||
inline void SetTopNode(long id) { m_parentNode = id; }
|
||||
inline long GetTopNode(void) const { return m_parentNode; }
|
||||
@@ -59,15 +59,15 @@ public:
|
||||
inline void SetMargins(long x, long y) { m_leftMargin = x; m_topMargin = y; }
|
||||
inline long GetTopMargin(void) const { return m_topMargin; }
|
||||
inline long GetLeftMargin(void) const { return m_leftMargin; }
|
||||
|
||||
|
||||
inline bool GetOrientation(void) const { return m_orientation; }
|
||||
inline void SetOrientation(bool orient) { m_orientation = orient; }
|
||||
|
||||
|
||||
private:
|
||||
void CalcLayout(long node_id, int level, wxDC& dc);
|
||||
|
||||
|
||||
// Members
|
||||
|
||||
|
||||
protected:
|
||||
long m_parentNode;
|
||||
long m_lastY;
|
||||
@@ -100,12 +100,12 @@ public:
|
||||
wxTreeLayoutStored(int noNodes = 200);
|
||||
~wxTreeLayoutStored(void);
|
||||
void Initialize(int n);
|
||||
|
||||
|
||||
wxString HitTest(wxMouseEvent& event, wxDC& dc);
|
||||
wxStoredNode* GetNode(long id) const;
|
||||
inline int GetNumNodes() const { return m_maxNodes; };
|
||||
inline int GetNodeCount() const { return m_num; };
|
||||
|
||||
|
||||
virtual void GetChildren(long id, wxList& list);
|
||||
virtual long GetNextNode(long id);
|
||||
virtual long GetNodeParent(long id);
|
||||
@@ -119,10 +119,10 @@ public:
|
||||
virtual bool NodeActive(long id);
|
||||
virtual void SetClientData(long id, long clientData);
|
||||
virtual long GetClientData(long id) const;
|
||||
|
||||
|
||||
virtual long AddChild(const wxString& name, const wxString& parent = "");
|
||||
virtual long NameToId(const wxString& name);
|
||||
|
||||
|
||||
// Data members
|
||||
private:
|
||||
wxStoredNode* m_nodes;
|
||||
@@ -135,4 +135,4 @@ private:
|
||||
|
||||
#endif
|
||||
// _WX_TREELAY_H_
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/* -------------------------------------------------------------------------
|
||||
* Project: GSocket (Generic Socket)
|
||||
* Name: gsocket.h
|
||||
* Author: Guilhem Lavaux
|
||||
* Author: Guilhem Lavaux
|
||||
* Guillermo Rodriguez Garcia <guille@iies.es> (maintainer)
|
||||
* Purpose: GSocket include file (system independent)
|
||||
* CVSID: $Id$
|
||||
@@ -126,11 +126,11 @@ GAddress *GSocket_GetPeer(GSocket *socket);
|
||||
* Sets up this socket as a server. The local address must have been
|
||||
* set with GSocket_SetLocal() before GSocket_SetServer() is called.
|
||||
* Returns GSOCK_NOERROR on success, one of the following otherwise:
|
||||
*
|
||||
*
|
||||
* Error codes:
|
||||
* GSOCK_INVSOCK - the socket is in use.
|
||||
* GSOCK_INVADDR - the local address has not been set.
|
||||
* GSOCK_IOERR - low-level error.
|
||||
* GSOCK_IOERR - low-level error.
|
||||
*/
|
||||
GSocketError GSocket_SetServer(GSocket *socket);
|
||||
|
||||
@@ -144,7 +144,7 @@ GSocketError GSocket_SetServer(GSocket *socket);
|
||||
* GSOCK_TIMEDOUT - timeout, no incoming connections.
|
||||
* GSOCK_WOULDBLOCK - the call would block and the socket is nonblocking.
|
||||
* GSOCK_MEMERR - couldn't allocate memory.
|
||||
* GSOCK_IOERR - low-level error.
|
||||
* GSOCK_IOERR - low-level error.
|
||||
*/
|
||||
GSocket *GSocket_WaitConnection(GSocket *socket);
|
||||
|
||||
@@ -172,7 +172,7 @@ GSocket *GSocket_WaitConnection(GSocket *socket);
|
||||
* GSOCK_TIMEDOUT - timeout, the connection failed.
|
||||
* GSOCK_WOULDBLOCK - connection in progress (nonblocking sockets only)
|
||||
* GSOCK_MEMERR - couldn't allocate memory.
|
||||
* GSOCK_IOERR - low-level error.
|
||||
* GSOCK_IOERR - low-level error.
|
||||
*/
|
||||
GSocketError GSocket_Connect(GSocket *socket, GSocketStream stream);
|
||||
|
||||
@@ -188,7 +188,7 @@ GSocketError GSocket_Connect(GSocket *socket, GSocketStream stream);
|
||||
* Error codes:
|
||||
* GSOCK_INVSOCK - the socket is in use.
|
||||
* GSOCK_INVADDR - the local address has not been set.
|
||||
* GSOCK_IOERR - low-level error.
|
||||
* GSOCK_IOERR - low-level error.
|
||||
*/
|
||||
GSocketError GSocket_SetNonOriented(GSocket *socket);
|
||||
|
||||
@@ -243,7 +243,7 @@ GSocketError GSocket_GetError(GSocket *socket);
|
||||
* operation, there is still data available, the callback function will
|
||||
* be called again.
|
||||
* GSOCK_OUTPUT:
|
||||
* The socket is available for writing. That is, the next write call
|
||||
* The socket is available for writing. That is, the next write call
|
||||
* won't block. This event is generated only once, when the connection is
|
||||
* first established, and then only if a call failed with GSOCK_WOULDBLOCK,
|
||||
* when the output buffer empties again. This means that the app should
|
||||
|
@@ -104,10 +104,10 @@ public:
|
||||
|
||||
size_t EnumAllFileTypes(wxArrayString& mimetypes);
|
||||
|
||||
// these are NOPs under Windows
|
||||
bool ReadMailcap(const wxString& filename, bool fallback = TRUE)
|
||||
// this are NOPs under Windows
|
||||
bool ReadMailcap(const wxString& WXUNUSED(filename), bool WXUNUSED(fallback) = TRUE)
|
||||
{ return TRUE; }
|
||||
bool ReadMimeTypes(const wxString& filename)
|
||||
bool ReadMimeTypes(const wxString& WXUNUSED(filename))
|
||||
{ return TRUE; }
|
||||
|
||||
// create a new filetype association
|
||||
|
@@ -19,7 +19,7 @@
|
||||
class WXDLLEXPORT wxDataFormat
|
||||
{
|
||||
public:
|
||||
// the clipboard formats under Win32 are WORDs
|
||||
// the clipboard formats under Win32 are WORD's
|
||||
typedef unsigned short NativeFormat;
|
||||
|
||||
wxDataFormat(NativeFormat format = wxDF_INVALID) { m_format = format; }
|
||||
|
@@ -87,7 +87,7 @@ public:
|
||||
|
||||
virtual void SetFocus();
|
||||
|
||||
virtual bool Reparent( wxWindow *newParent );
|
||||
virtual bool Reparent( wxWindowBase *newParent );
|
||||
|
||||
virtual void WarpPointer(int x, int y);
|
||||
virtual void CaptureMouse();
|
||||
@@ -328,9 +328,9 @@ public:
|
||||
bool HandleMouseEvent(WXUINT msg, int x, int y, WXUINT flags);
|
||||
bool HandleMouseMove(int x, int y, WXUINT flags);
|
||||
|
||||
bool HandleChar(WXWORD wParam, WXLPARAM lParam, bool isASCII = FALSE);
|
||||
bool HandleKeyDown(WXWORD wParam, WXLPARAM lParam);
|
||||
bool HandleKeyUp(WXWORD wParam, WXLPARAM lParam);
|
||||
bool HandleChar(WXWPARAM wParam, WXLPARAM lParam, bool isASCII = FALSE);
|
||||
bool HandleKeyDown(WXWPARAM wParam, WXLPARAM lParam);
|
||||
bool HandleKeyUp(WXWPARAM wParam, WXLPARAM lParam);
|
||||
|
||||
bool HandleQueryDragIcon(WXHICON *hIcon);
|
||||
|
||||
|
@@ -175,6 +175,13 @@ wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name(void) \
|
||||
? (className *)(obj) \
|
||||
: (className *)0)
|
||||
|
||||
// The 'this' pointer is always true, so use this version to cast the this
|
||||
// pointer and avoid compiler warnings.
|
||||
#define wxDynamicThisCast(obj, className) \
|
||||
(((obj)->IsKindOf(&className::sm_class##className)) \
|
||||
? (className *)(obj) \
|
||||
: (className *)0)
|
||||
|
||||
#define wxConstCast(obj, className) ((className *)(obj))
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
|
@@ -236,7 +236,7 @@ public:
|
||||
// between the two states.
|
||||
wxToolBarToolBase *AddTool(int id,
|
||||
const wxBitmap& bitmap,
|
||||
const wxBitmap& pushedBitmap = wxNullBitmap,
|
||||
const wxBitmap& pushedBitmap,
|
||||
bool toggle = FALSE,
|
||||
wxObject *clientData = NULL,
|
||||
const wxString& shortHelpString = wxEmptyString,
|
||||
|
Reference in New Issue
Block a user