applied patch #929947: "Various cleaning of warnings under MSW"; removed some tabs

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Dimitri Schoolwerth
2004-04-06 13:19:42 +00:00
parent 1b035b8cd0
commit d1f4723592
15 changed files with 61 additions and 61 deletions

View File

@@ -73,8 +73,8 @@ public:
// Overridables // Overridables
// Start/end copying // Start/end copying
virtual bool OnStartCopy(wxDiagram* diagramTo) { return TRUE; }; virtual bool OnStartCopy(wxDiagram* WXUNUSED(diagramTo)) { return TRUE; };
virtual bool OnEndCopy(wxDiagram* diagramTo) { return TRUE; }; virtual bool OnEndCopy(wxDiagram* WXUNUSED(diagramTo)) { return TRUE; };
// Override this to e.g. have the shape added through a Do/Undo command system. // Override this to e.g. have the shape added through a Do/Undo command system.
// By default, we'll just add it directly to the destination diagram, and // By default, we'll just add it directly to the destination diagram, and
@@ -97,10 +97,10 @@ public:
~csDiagramClipboard() {} ~csDiagramClipboard() {}
// Start/end copying // Start/end copying
bool OnStartCopy(wxDiagram* diagramTo); virtual bool OnStartCopy(wxDiagram* diagramTo);
bool OnEndCopy(wxDiagram* diagramTo); virtual bool OnEndCopy(wxDiagram* diagramTo);
bool OnAddShape(wxDiagram* diagramTo, wxShape* newShape, wxDC* dc); virtual bool OnAddShape(wxDiagram* diagramTo, wxShape* newShape, wxDC* dc);
protected: protected:
csDiagramCommand* m_currentCmd; csDiagramCommand* m_currentCmd;

View File

@@ -594,7 +594,7 @@ void wxLineShape::DrawArrow(wxDC& dc, wxArrowHead *arrow, double xOffset, bool p
wxRealPoint *second_last_line_point = (wxRealPoint *)second_last_line_node->GetData(); wxRealPoint *second_last_line_point = (wxRealPoint *)second_last_line_node->GetData();
// Position where we want to start drawing // Position where we want to start drawing
double positionOnLineX, positionOnLineY; double positionOnLineX = 0.0, positionOnLineY = 0.0;
// Position of start point of line, at the end of which we draw the arrow. // Position of start point of line, at the end of which we draw the arrow.
double startPositionX = 0.0 , startPositionY = 0.0; double startPositionX = 0.0 , startPositionY = 0.0;
@@ -1090,8 +1090,8 @@ void wxLineShape::FindLineEndPoints(double *fromX, double *fromY, double *toX, d
// Do each end - nothing in the middle. User has to move other points // Do each end - nothing in the middle. User has to move other points
// manually if necessary. // manually if necessary.
double end_x, end_y; double end_x = 0.0, end_y = 0.0;
double other_end_x, other_end_y; double other_end_x = 0.0, other_end_y = 0.0;
wxNode *first = m_lineControlPoints->GetFirst(); wxNode *first = m_lineControlPoints->GetFirst();
/* wxRealPoint *first_point = */ (wxRealPoint *)first->GetData(); /* wxRealPoint *first_point = */ (wxRealPoint *)first->GetData();

View File

@@ -989,7 +989,7 @@ wxSize wxXmlResourceHandler::GetSize(const wxString& param)
wxString s = GetParamValue(param); wxString s = GetParamValue(param);
if (s.IsEmpty()) s = wxT("-1,-1"); if (s.IsEmpty()) s = wxT("-1,-1");
bool is_dlg; bool is_dlg;
long sx, sy; long sx, sy = 0;
is_dlg = s[s.Length()-1] == wxT('d'); is_dlg = s[s.Length()-1] == wxT('d');
if (is_dlg) s.RemoveLast(); if (is_dlg) s.RemoveLast();

View File

@@ -123,7 +123,7 @@ class NodeHandlerUnknown : public NodeHandler
public: public:
NodeHandlerUnknown() : NodeHandler(new NodeInfo) {} NodeHandlerUnknown() : NodeHandler(new NodeInfo) {}
virtual bool CanHandle(wxXmlNode *node) { return TRUE; } virtual bool CanHandle(wxXmlNode *WXUNUSED(node)) { return TRUE; }
}; };

View File

@@ -192,13 +192,13 @@ class PropEditCtrlCoordXY : public PropEditCtrlInt
return m_c[m_which]; return m_c[m_which];
} }
virtual wxString GetPropName(const PropertyInfo& pinfo) virtual wxString GetPropName(const PropertyInfo& WXUNUSED(pinfo))
{ {
if (m_which == 0) return _T("x"); else return _T("y"); if (m_which == 0) return _T("x"); else return _T("y");
} }
virtual bool HasClearButton() { return FALSE; } virtual bool HasClearButton() { return FALSE; }
virtual bool IsPresent(const PropertyInfo& pinfo) { return FALSE; } virtual bool IsPresent(const PropertyInfo& WXUNUSED(pinfo)) { return FALSE; }
protected: protected:
@@ -243,13 +243,13 @@ class PropEditCtrlCoordDlg : public PropEditCtrlBool
return _("true"); return _("true");
} }
virtual wxString GetPropName(const PropertyInfo& pinfo) virtual wxString GetPropName(const PropertyInfo& WXUNUSED(pinfo))
{ {
return _T("dlg"); return _T("dlg");
} }
virtual bool HasClearButton() { return FALSE; } virtual bool HasClearButton() { return FALSE; }
virtual bool IsPresent(const PropertyInfo& pinfo) { return FALSE; } virtual bool IsPresent(const PropertyInfo& WXUNUSED(pinfo)) { return FALSE; }
}; };
@@ -318,13 +318,13 @@ class PropEditCtrlDimX : public PropEditCtrlInt
return XmlReadValue(GetNode(), pi->Name).BeforeFirst(_T('d')); return XmlReadValue(GetNode(), pi->Name).BeforeFirst(_T('d'));
} }
virtual wxString GetPropName(const PropertyInfo& pinfo) virtual wxString GetPropName(const PropertyInfo& WXUNUSED(pinfo))
{ {
return _T("val"); return _T("val");
} }
virtual bool HasClearButton() { return FALSE; } virtual bool HasClearButton() { return FALSE; }
virtual bool IsPresent(const PropertyInfo& pinfo) { return FALSE; } virtual bool IsPresent(const PropertyInfo& WXUNUSED(pinfo)) { return FALSE; }
protected: protected:

View File

@@ -26,7 +26,7 @@ class PropEditCtrlNull : public PropEditCtrl
PropEditCtrlNull(PropertiesFrame *propFrame) PropEditCtrlNull(PropertiesFrame *propFrame)
: PropEditCtrl(propFrame) {} : PropEditCtrl(propFrame) {}
virtual void BeginEdit(const wxRect& rect, wxTreeItemId ti) {} virtual void BeginEdit(const wxRect& WXUNUSED(rect), wxTreeItemId WXUNUSED(ti)) {}
virtual void EndEdit() {} virtual void EndEdit() {}
virtual wxWindow* CreateEditCtrl() {return NULL;} virtual wxWindow* CreateEditCtrl() {return NULL;}

View File

@@ -1,12 +1,12 @@
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
// Name: BrowserDB.h,cpp // Name: BrowserDB.h,cpp
// Purpose: a wxDB class // Purpose: a wxDB class
// Author: Mark Johnson // Author: Mark Johnson
// Modified by: // Modified by:
// Created: 19991127.mj10777 // Created: 19991127.mj10777
// Copyright: (c) Mark Johnson // Copyright: (c) Mark Johnson
// Licence: wxWindows license // Licence: wxWindows license
// RCS-ID: $Id$ // RCS-ID: $Id$
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
//-- 1) //-- 1)
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
@@ -38,7 +38,7 @@ wxDbConnectInf DbConnectInf;
#endif #endif
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
extern WXDLLEXPORT_DATA(wxDbList*) PtrBegDbList; /* from db.cpp, used in getting back error results from db connections */ extern WXDLLEXPORT_DATA(wxDbList*) PtrBegDbList; /* from db.cpp, used in getting back error results from db connections */
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
wxChar *GetExtendedDBErrorMsg(wxChar *ErrFile, int ErrLine) wxChar *GetExtendedDBErrorMsg(wxChar *ErrFile, int ErrLine)
@@ -127,8 +127,8 @@ bool BrowserDB::OnStartDB(int Quiet)
//--------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------
DlgUser *p_Dlg; DlgUser *p_Dlg;
p_Dlg = new DlgUser(pDoc->p_MainFrame,pDoc,_T("")); p_Dlg = new DlgUser(pDoc->p_MainFrame,pDoc,_T(""));
p_Dlg->s_DSN = ODBCSource; p_Dlg->s_DSN = ODBCSource;
p_Dlg->s_User = UserName; p_Dlg->s_User = UserName;
p_Dlg->s_Password = Password; p_Dlg->s_Password = Password;
p_Dlg->OnInit(); p_Dlg->OnInit();
p_Dlg->Fit(); p_Dlg->Fit();
@@ -146,9 +146,9 @@ bool BrowserDB::OnStartDB(int Quiet)
if (OK) if (OK)
{ {
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
DbConnectInf.SetDsn(ODBCSource); // ODBC data source name (created with ODBC Administrator under Win95/NT) DbConnectInf.SetDsn(ODBCSource); // ODBC data source name (created with ODBC Administrator under Win95/NT)
DbConnectInf.SetUserID(UserName); // database username - must already exist in the data source DbConnectInf.SetUserID(UserName); // database username - must already exist in the data source
DbConnectInf.SetPassword(Password); // password database username DbConnectInf.SetPassword(Password); // password database username
db_BrowserDB = wxDbGetConnection(&DbConnectInf); db_BrowserDB = wxDbGetConnection(&DbConnectInf);
// wxLogMessage(">>>%s<<<>>>%s<<<",UserName.c_str(),Password.c_str()); // wxLogMessage(">>>%s<<<>>>%s<<<",UserName.c_str(),Password.c_str());
if (db_BrowserDB == NULL) if (db_BrowserDB == NULL)
@@ -204,12 +204,11 @@ bool BrowserDB::OnCloseDB(int Quiet)
bool BrowserDB::OnGetNext(int Cols,int WXUNUSED(Quiet)) bool BrowserDB::OnGetNext(int Cols,int WXUNUSED(Quiet))
{ {
SDWORD cb; SDWORD cb;
int i_dbDataType; int i_dbDataType;
int i=0;
wxChar s_temp[1024+1]; wxChar s_temp[1024+1];
long l_temp; long l_temp;
double f_temp; double f_temp;
int AnzError=0; int AnzError=0;
TIMESTAMP_STRUCT t_temp; TIMESTAMP_STRUCT t_temp;
wxString Temp0; wxString Temp0;
//----------------------------- //-----------------------------
@@ -225,14 +224,15 @@ bool BrowserDB::OnGetNext(int Cols,int WXUNUSED(Quiet))
} }
else else
{ {
int i;
for (i=0;i<Cols;i++) for (i=0;i<Cols;i++)
{ {
wxStrcpy((cl_BrowserDB+i)->tableName,_T("-E->")); wxStrcpy((cl_BrowserDB+i)->tableName,_T("-E->"));
i_dbDataType = (cl_BrowserDB+i)->pColFor->i_dbDataType; i_dbDataType = (cl_BrowserDB+i)->pColFor->i_dbDataType;
if (i_dbDataType == 0) // Filter unsupported dbDataTypes if (i_dbDataType == 0) // Filter unsupported dbDataTypes
{ {
if (((cl_BrowserDB+i)->pColFor->i_sqlDataType == SQL_VARCHAR) || if (((cl_BrowserDB+i)->pColFor->i_sqlDataType == SQL_VARCHAR) ||
((cl_BrowserDB+i)->pColFor->i_sqlDataType == SQL_LONGVARCHAR)) ((cl_BrowserDB+i)->pColFor->i_sqlDataType == SQL_LONGVARCHAR))
i_dbDataType = DB_DATA_TYPE_VARCHAR; i_dbDataType = DB_DATA_TYPE_VARCHAR;
if ((cl_BrowserDB+i)->pColFor->i_sqlDataType == SQL_C_DATE) if ((cl_BrowserDB+i)->pColFor->i_sqlDataType == SQL_C_DATE)
i_dbDataType = DB_DATA_TYPE_DATE; i_dbDataType = DB_DATA_TYPE_DATE;
@@ -244,8 +244,8 @@ bool BrowserDB::OnGetNext(int Cols,int WXUNUSED(Quiet))
i_dbDataType = DB_DATA_TYPE_FLOAT; i_dbDataType = DB_DATA_TYPE_FLOAT;
} }
if ((i_dbDataType == DB_DATA_TYPE_INTEGER) && if ((i_dbDataType == DB_DATA_TYPE_INTEGER) &&
((cl_BrowserDB+i)->pColFor->i_sqlDataType == SQL_C_DOUBLE)) ((cl_BrowserDB+i)->pColFor->i_sqlDataType == SQL_C_DOUBLE))
{ // DBASE Numeric { // DBASE Numeric
i_dbDataType = DB_DATA_TYPE_FLOAT; i_dbDataType = DB_DATA_TYPE_FLOAT;
} }
switch(i_dbDataType) switch(i_dbDataType)
@@ -298,8 +298,8 @@ bool BrowserDB::OnGetNext(int Cols,int WXUNUSED(Quiet))
else else
{ {
// i_Nation = 0 = timestamp , 1=EU, 2=UK, 3=International, 4=US // i_Nation = 0 = timestamp , 1=EU, 2=UK, 3=International, 4=US
if (((cl_BrowserDB+i)->pColFor->i_Nation == 0) || // TS YYYY-MM-DD if (((cl_BrowserDB+i)->pColFor->i_Nation == 0) || // TS YYYY-MM-DD
((cl_BrowserDB+i)->pColFor->i_Nation == 3)) // IT YYYY-MM-DD ((cl_BrowserDB+i)->pColFor->i_Nation == 3)) // IT YYYY-MM-DD
{ {
Temp0.Printf((cl_BrowserDB+i)->pColFor->s_Field,t_temp.year,t_temp.month,t_temp.day, Temp0.Printf((cl_BrowserDB+i)->pColFor->s_Field,t_temp.year,t_temp.month,t_temp.day,
t_temp.hour, t_temp.minute, t_temp.second, t_temp.fraction); t_temp.hour, t_temp.minute, t_temp.second, t_temp.fraction);
@@ -312,7 +312,7 @@ bool BrowserDB::OnGetNext(int Cols,int WXUNUSED(Quiet))
t_temp.hour, t_temp.minute, t_temp.second, t_temp.fraction); t_temp.hour, t_temp.minute, t_temp.second, t_temp.fraction);
wxStrcpy((cl_BrowserDB+i)->tableName,Temp0.c_str()); wxStrcpy((cl_BrowserDB+i)->tableName,Temp0.c_str());
} }
if ((cl_BrowserDB+i)->pColFor->i_Nation == 3) // US MM/DD/YYYY if ((cl_BrowserDB+i)->pColFor->i_Nation == 3) // US MM/DD/YYYY
{ {
Temp0.Printf((cl_BrowserDB+i)->pColFor->s_Field,t_temp.month,t_temp.day,t_temp.year, Temp0.Printf((cl_BrowserDB+i)->pColFor->s_Field,t_temp.month,t_temp.day,t_temp.year,
t_temp.hour, t_temp.minute, t_temp.second, t_temp.fraction); t_temp.hour, t_temp.minute, t_temp.second, t_temp.fraction);
@@ -452,10 +452,10 @@ void BrowserDB::PointerToNULL(int Art)
delete db_BrowserDB; delete db_BrowserDB;
} }
} }
cl_BrowserDB = NULL; cl_BrowserDB = NULL;
ct_BrowserDB = NULL; ct_BrowserDB = NULL;
db_BrowserDB = NULL; db_BrowserDB = NULL;
p_LogWindow = NULL; p_LogWindow = NULL;
} }
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------

View File

@@ -89,7 +89,7 @@ public:
// notifications (can be handled by derivatives) // notifications (can be handled by derivatives)
virtual void OnTabAdded( twTabInfo* pInfo ) {} virtual void OnTabAdded( twTabInfo* WXUNUSED(pInfo) ) {}
virtual void SizeTabs(int x,int y, int width, int height, bool repant); virtual void SizeTabs(int x,int y, int width, int height, bool repant);

View File

@@ -75,9 +75,9 @@ public:
bool LifeCellBox::IsAlive(int dx, int dy) const bool LifeCellBox::IsAlive(int dx, int dy) const
{ {
if (dy > 3) if (dy > 3)
return (m_live2 & 1 << ((dy - 4) * 8 + dx)); return (bool)(m_live2 & 1 << ((dy - 4) * 8 + dx));
else else
return (m_live1 & 1 << ((dy) * 8 + dx)); return (bool)(m_live1 & 1 << ((dy) * 8 + dx));
} }
// SetCell: // SetCell:

View File

@@ -82,7 +82,7 @@ class URLDropTarget : public wxDropTarget
public: public:
URLDropTarget() { SetDataObject(new wxURLDataObject); } URLDropTarget() { SetDataObject(new wxURLDataObject); }
void OnDropURL(wxCoord x, wxCoord y, const wxString& text) void OnDropURL(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), const wxString& text)
{ {
// of course, a real program would do something more useful here... // of course, a real program would do something more useful here...
wxMessageBox(text, _T("wxDnD sample: got URL"), wxMessageBox(text, _T("wxDnD sample: got URL"),
@@ -91,7 +91,7 @@ public:
// URLs can't be moved, only copied // URLs can't be moved, only copied
virtual wxDragResult OnDragOver(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), virtual wxDragResult OnDragOver(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y),
wxDragResult def) wxDragResult WXUNUSED(def))
{ {
return wxDragLink; // At least IE 5.x needs wxDragLink, the return wxDragLink; // At least IE 5.x needs wxDragLink, the
// other browsers on MSW seem okay with it too. // other browsers on MSW seem okay with it too.
@@ -144,7 +144,7 @@ public:
Refresh(); Refresh();
} }
void OnPaint(wxPaintEvent& event) void OnPaint(wxPaintEvent& WXUNUSED(event))
{ {
wxPaintDC dc(this); wxPaintDC dc(this);
@@ -613,7 +613,7 @@ public:
} }
virtual bool SetData(const wxDataFormat& format, virtual bool SetData(const wxDataFormat& format,
size_t len, const void *buf) size_t WXUNUSED(len), const void *buf)
{ {
wxCHECK_MSG( format == m_formatShape, false, wxCHECK_MSG( format == m_formatShape, false,
wxT( "unsupported format") ); wxT( "unsupported format") );

View File

@@ -86,8 +86,8 @@ public:
void OnQuit(wxCommandEvent& event); void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event); void OnAbout(wxCommandEvent& event);
void OnIncFont(wxCommandEvent& event) { DoResizeFont(+2); } void OnIncFont(wxCommandEvent& WXUNUSED(event)) { DoResizeFont(+2); }
void OnDecFont(wxCommandEvent& event) { DoResizeFont(-2); } void OnDecFont(wxCommandEvent& WXUNUSED(event)) { DoResizeFont(-2); }
void OnBold(wxCommandEvent& event); void OnBold(wxCommandEvent& event);
void OnItalic(wxCommandEvent& event); void OnItalic(wxCommandEvent& event);

View File

@@ -112,7 +112,7 @@ private:
} }
} }
virtual void DoLogString(const wxChar *szString, time_t t) virtual void DoLogString(const wxChar *szString, time_t WXUNUSED(t))
{ {
wxString msg; wxString msg;
TimeStamp(&msg); TimeStamp(&msg);
@@ -154,7 +154,7 @@ protected:
void OnKeyUp(wxKeyEvent& event) { LogEvent(_T("Key up"), event); } void OnKeyUp(wxKeyEvent& event) { LogEvent(_T("Key up"), event); }
void OnChar(wxKeyEvent& event) { LogEvent(_T("Char"), event); } void OnChar(wxKeyEvent& event) { LogEvent(_T("Char"), event); }
void OnPaint(wxPaintEvent& event) void OnPaint(wxPaintEvent& WXUNUSED(event))
{ {
wxPaintDC dc(this); wxPaintDC dc(this);
dc.SetTextForeground(*wxWHITE); dc.SetTextForeground(*wxWHITE);

View File

@@ -228,7 +228,7 @@ private:
} }
} }
virtual void DoLogString(const wxChar *szString, time_t t) virtual void DoLogString(const wxChar *szString, time_t WXUNUSED(t))
{ {
wxString msg; wxString msg;
TimeStamp(&msg); TimeStamp(&msg);
@@ -526,7 +526,7 @@ void LboxTestFrame::CreateLbox()
items.Add(m_lbox->GetString(n)); items.Add(m_lbox->GetString(n));
} }
m_sizerLbox->Remove(m_lbox); m_sizerLbox->Detach(m_lbox);
delete m_lbox; delete m_lbox;
} }

View File

@@ -96,7 +96,7 @@ public:
void UpdateClock(); void UpdateClock();
// event handlers // event handlers
void OnTimer(wxTimerEvent& event) { UpdateClock(); } void OnTimer(wxTimerEvent& WXUNUSED(event)) { UpdateClock(); }
void OnSize(wxSizeEvent& event); void OnSize(wxSizeEvent& event);
void OnToggleClock(wxCommandEvent& event); void OnToggleClock(wxCommandEvent& event);
void OnButton(wxCommandEvent& event); void OnButton(wxCommandEvent& event);

View File

@@ -989,7 +989,7 @@ wxSize wxXmlResourceHandler::GetSize(const wxString& param)
wxString s = GetParamValue(param); wxString s = GetParamValue(param);
if (s.IsEmpty()) s = wxT("-1,-1"); if (s.IsEmpty()) s = wxT("-1,-1");
bool is_dlg; bool is_dlg;
long sx, sy; long sx, sy = 0;
is_dlg = s[s.Length()-1] == wxT('d'); is_dlg = s[s.Length()-1] == wxT('d');
if (is_dlg) s.RemoveLast(); if (is_dlg) s.RemoveLast();