Warning fixes found under hardest mode of OpenWatcom. Seems clean in Borland, MinGW and DMC.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29784 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -117,7 +117,7 @@ public:
|
|||||||
long style = 0);
|
long style = 0);
|
||||||
|
|
||||||
// empty but ensures that dtor of all derived classes is virtual
|
// empty but ensures that dtor of all derived classes is virtual
|
||||||
virtual ~wxConfigBase();
|
virtual ~wxConfigBase(){};
|
||||||
|
|
||||||
// path management
|
// path management
|
||||||
// set current path: if the first character is '/', it's the absolute path,
|
// set current path: if the first character is '/', it's the absolute path,
|
||||||
|
@@ -1327,7 +1327,7 @@ public:
|
|||||||
static void AddAuthority(wxDateTimeHolidayAuthority *auth);
|
static void AddAuthority(wxDateTimeHolidayAuthority *auth);
|
||||||
|
|
||||||
// the base class must have a virtual dtor
|
// the base class must have a virtual dtor
|
||||||
virtual ~wxDateTimeHolidayAuthority();
|
virtual ~wxDateTimeHolidayAuthority(){};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// this function is called to determine whether a given day is a holiday
|
// this function is called to determine whether a given day is a holiday
|
||||||
|
@@ -84,7 +84,7 @@ struct WXDLLIMPEXP_HTML wxHtmlHelpDataItem
|
|||||||
{
|
{
|
||||||
wxHtmlHelpDataItem() : level(0), parent(NULL), id(wxID_ANY), book(NULL) {}
|
wxHtmlHelpDataItem() : level(0), parent(NULL), id(wxID_ANY), book(NULL) {}
|
||||||
|
|
||||||
short int level;
|
int level;
|
||||||
wxHtmlHelpDataItem *parent;
|
wxHtmlHelpDataItem *parent;
|
||||||
int id;
|
int id;
|
||||||
wxString name;
|
wxString name;
|
||||||
@@ -110,7 +110,7 @@ struct wxHtmlContentsItem
|
|||||||
wxHtmlContentsItem& operator=(const wxHtmlContentsItem& d);
|
wxHtmlContentsItem& operator=(const wxHtmlContentsItem& d);
|
||||||
~wxHtmlContentsItem();
|
~wxHtmlContentsItem();
|
||||||
|
|
||||||
short int m_Level;
|
int m_Level;
|
||||||
int m_ID;
|
int m_ID;
|
||||||
wxChar *m_Name;
|
wxChar *m_Name;
|
||||||
wxChar *m_Page;
|
wxChar *m_Page;
|
||||||
|
@@ -39,7 +39,7 @@ public:
|
|||||||
long style = wxCONFIG_USE_GLOBAL_FILE);
|
long style = wxCONFIG_USE_GLOBAL_FILE);
|
||||||
|
|
||||||
// dtor will save unsaved data
|
// dtor will save unsaved data
|
||||||
virtual ~wxRegConfig();
|
virtual ~wxRegConfig(){};
|
||||||
|
|
||||||
// implement inherited pure virtual functions
|
// implement inherited pure virtual functions
|
||||||
// ------------------------------------------
|
// ------------------------------------------
|
||||||
|
@@ -165,7 +165,7 @@ public:
|
|||||||
wxMBConv& conv = wxConvUTF8);
|
wxMBConv& conv = wxConvUTF8);
|
||||||
|
|
||||||
// dtor
|
// dtor
|
||||||
virtual ~wxTextBuffer();
|
virtual ~wxTextBuffer(){};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// ctors
|
// ctors
|
||||||
|
@@ -73,10 +73,6 @@ wxConfigBase::wxConfigBase(const wxString& appName,
|
|||||||
m_bRecordDefaults = false;
|
m_bRecordDefaults = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxConfigBase::~wxConfigBase()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
wxConfigBase *wxConfigBase::Set(wxConfigBase *pConfig)
|
wxConfigBase *wxConfigBase::Set(wxConfigBase *pConfig)
|
||||||
{
|
{
|
||||||
wxConfigBase *pOld = ms_pConfig;
|
wxConfigBase *pOld = ms_pConfig;
|
||||||
|
@@ -1974,7 +1974,7 @@ wxDateTime& wxDateTime::SetToYearDay(wxDateTime::wxDateTime_t yday)
|
|||||||
// yday lies in December then
|
// yday lies in December then
|
||||||
if ( (mon == Dec) || (yday <= gs_cumulatedDays[isLeap][mon + 1]) )
|
if ( (mon == Dec) || (yday <= gs_cumulatedDays[isLeap][mon + 1]) )
|
||||||
{
|
{
|
||||||
Set(yday - gs_cumulatedDays[isLeap][mon], mon, year);
|
Set((wxDateTime::wxDateTime_t)(yday - gs_cumulatedDays[isLeap][mon]), mon, year);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2565,7 +2565,7 @@ const wxChar *wxDateTime::ParseRfc822Date(const wxChar* date)
|
|||||||
return (wxChar *)NULL;
|
return (wxChar *)NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxDateTime_t hour = *p++ - _T('0');
|
wxDateTime_t hour = (wxDateTime_t)(*p++ - _T('0'));
|
||||||
|
|
||||||
if ( !wxIsdigit(*p) )
|
if ( !wxIsdigit(*p) )
|
||||||
{
|
{
|
||||||
@@ -2573,7 +2573,7 @@ const wxChar *wxDateTime::ParseRfc822Date(const wxChar* date)
|
|||||||
}
|
}
|
||||||
|
|
||||||
hour *= 10;
|
hour *= 10;
|
||||||
hour += *p++ - _T('0');
|
hour = (wxDateTime_t)(hour + (*p++ - _T('0')));
|
||||||
|
|
||||||
if ( *p++ != _T(':') )
|
if ( *p++ != _T(':') )
|
||||||
{
|
{
|
||||||
@@ -2585,7 +2585,7 @@ const wxChar *wxDateTime::ParseRfc822Date(const wxChar* date)
|
|||||||
return (wxChar *)NULL;
|
return (wxChar *)NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxDateTime_t min = *p++ - _T('0');
|
wxDateTime_t min = (wxDateTime_t)(*p++ - _T('0'));
|
||||||
|
|
||||||
if ( !wxIsdigit(*p) )
|
if ( !wxIsdigit(*p) )
|
||||||
{
|
{
|
||||||
@@ -2593,7 +2593,7 @@ const wxChar *wxDateTime::ParseRfc822Date(const wxChar* date)
|
|||||||
}
|
}
|
||||||
|
|
||||||
min *= 10;
|
min *= 10;
|
||||||
min += *p++ - _T('0');
|
min = (wxDateTime_t)(min + *p++ - _T('0'));
|
||||||
|
|
||||||
wxDateTime_t sec = 0;
|
wxDateTime_t sec = 0;
|
||||||
if ( *p++ == _T(':') )
|
if ( *p++ == _T(':') )
|
||||||
@@ -2603,7 +2603,7 @@ const wxChar *wxDateTime::ParseRfc822Date(const wxChar* date)
|
|||||||
return (wxChar *)NULL;
|
return (wxChar *)NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
sec = *p++ - _T('0');
|
sec = (wxDateTime_t)(*p++ - _T('0'));
|
||||||
|
|
||||||
if ( !wxIsdigit(*p) )
|
if ( !wxIsdigit(*p) )
|
||||||
{
|
{
|
||||||
@@ -2611,7 +2611,7 @@ const wxChar *wxDateTime::ParseRfc822Date(const wxChar* date)
|
|||||||
}
|
}
|
||||||
|
|
||||||
sec *= 10;
|
sec *= 10;
|
||||||
sec += *p++ - _T('0');
|
sec = (wxDateTime_t)(sec + *p++ - _T('0'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( *p++ != _T(' ') )
|
if ( *p++ != _T(' ') )
|
||||||
@@ -3463,9 +3463,11 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date)
|
|||||||
}
|
}
|
||||||
else // may be either day or year
|
else // may be either day or year
|
||||||
{
|
{
|
||||||
wxDateTime_t maxDays = haveMon
|
wxDateTime_t maxDays = (wxDateTime_t)(
|
||||||
|
haveMon
|
||||||
? GetNumOfDaysInMonth(haveYear ? year : Inv_Year, mon)
|
? GetNumOfDaysInMonth(haveYear ? year : Inv_Year, mon)
|
||||||
: 31;
|
: 31
|
||||||
|
);
|
||||||
|
|
||||||
// can it be day?
|
// can it be day?
|
||||||
if ( (val == 0) || (val > (unsigned long)maxDays) )
|
if ( (val == 0) || (val > (unsigned long)maxDays) )
|
||||||
@@ -3519,7 +3521,7 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date)
|
|||||||
{
|
{
|
||||||
// no need to check in month range as always < 12, but
|
// no need to check in month range as always < 12, but
|
||||||
// the days are counted from 1 unlike the months
|
// the days are counted from 1 unlike the months
|
||||||
day = (wxDateTime_t)mon + 1;
|
day = (wxDateTime_t)(mon + 1);
|
||||||
haveDay = true;
|
haveDay = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -3641,7 +3643,7 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date)
|
|||||||
// we're in the current year then
|
// we're in the current year then
|
||||||
if ( (year > 0) && (year <= (int)GetNumOfDaysInMonth(Inv_Year, mon)) )
|
if ( (year > 0) && (year <= (int)GetNumOfDaysInMonth(Inv_Year, mon)) )
|
||||||
{
|
{
|
||||||
day = year;
|
day = (wxDateTime_t)year;
|
||||||
|
|
||||||
haveMon = true;
|
haveMon = true;
|
||||||
haveYear = false;
|
haveYear = false;
|
||||||
@@ -4028,11 +4030,6 @@ void wxDateTimeHolidayAuthority::AddAuthority(wxDateTimeHolidayAuthority *auth)
|
|||||||
ms_authorities.push_back(auth);
|
ms_authorities.push_back(auth);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxDateTimeHolidayAuthority::~wxDateTimeHolidayAuthority()
|
|
||||||
{
|
|
||||||
// nothing to do here
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxDateTimeWorkDays
|
// wxDateTimeWorkDays
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -1351,7 +1351,7 @@ void wxBoxSizer::RecalcSizes()
|
|||||||
}
|
}
|
||||||
|
|
||||||
wxPoint child_pos( pt );
|
wxPoint child_pos( pt );
|
||||||
wxSize child_size( wxSize( size.x, height) );
|
wxSize child_size( size.x, height );
|
||||||
|
|
||||||
if (item->GetFlag() & (wxEXPAND | wxSHAPED))
|
if (item->GetFlag() & (wxEXPAND | wxSHAPED))
|
||||||
child_size.x = m_size.x;
|
child_size.x = m_size.x;
|
||||||
@@ -1377,7 +1377,7 @@ void wxBoxSizer::RecalcSizes()
|
|||||||
}
|
}
|
||||||
|
|
||||||
wxPoint child_pos( pt );
|
wxPoint child_pos( pt );
|
||||||
wxSize child_size( wxSize(width, size.y) );
|
wxSize child_size( width, size.y );
|
||||||
|
|
||||||
if (item->GetFlag() & (wxEXPAND | wxSHAPED))
|
if (item->GetFlag() & (wxEXPAND | wxSHAPED))
|
||||||
child_size.y = m_size.y;
|
child_size.y = m_size.y;
|
||||||
|
@@ -146,10 +146,6 @@ wxTextBuffer::wxTextBuffer(const wxString& strBufferName)
|
|||||||
m_isOpened = false;
|
m_isOpened = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxTextBuffer::~wxTextBuffer()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// buffer operations
|
// buffer operations
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -144,7 +144,8 @@ wxRect wxChoicebook::GetPageRect() const
|
|||||||
{
|
{
|
||||||
const wxSize sizeChoice = m_choice->GetSize();
|
const wxSize sizeChoice = m_choice->GetSize();
|
||||||
|
|
||||||
wxRect rectPage(wxPoint(0, 0), GetClientSize());
|
wxPoint pt(0, 0);
|
||||||
|
wxRect rectPage(pt, GetClientSize());
|
||||||
switch ( GetWindowStyle() & wxCHB_ALIGN_MASK )
|
switch ( GetWindowStyle() & wxCHB_ALIGN_MASK )
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
|
@@ -1072,7 +1072,8 @@ void wxGridCellFloatEditor::StartingKey(wxKeyEvent& event)
|
|||||||
char tmpbuf[2];
|
char tmpbuf[2];
|
||||||
tmpbuf[0] = (char) keycode;
|
tmpbuf[0] = (char) keycode;
|
||||||
tmpbuf[1] = '\0';
|
tmpbuf[1] = '\0';
|
||||||
bool is_decimal_point = ( wxString(tmpbuf, *wxConvCurrent) ==
|
wxString strbuf(tmpbuf, *wxConvCurrent);
|
||||||
|
bool is_decimal_point = ( strbuf ==
|
||||||
wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT, wxLOCALE_CAT_NUMBER) );
|
wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT, wxLOCALE_CAT_NUMBER) );
|
||||||
if ( wxIsdigit(keycode) || keycode == '+' || keycode == '-'
|
if ( wxIsdigit(keycode) || keycode == '+' || keycode == '-'
|
||||||
|| is_decimal_point
|
|| is_decimal_point
|
||||||
|
@@ -172,7 +172,8 @@ wxRect wxListbook::GetPageRect() const
|
|||||||
{
|
{
|
||||||
const wxSize sizeList = m_list->GetSize();
|
const wxSize sizeList = m_list->GetSize();
|
||||||
|
|
||||||
wxRect rectPage(wxPoint(0, 0), GetClientSize());
|
wxPoint pt(0, 0);
|
||||||
|
wxRect rectPage(pt, GetClientSize());
|
||||||
switch ( GetWindowStyle() & wxLB_ALIGN_MASK )
|
switch ( GetWindowStyle() & wxLB_ALIGN_MASK )
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
|
@@ -483,8 +483,10 @@ void wxSashWindow::DrawSash(wxSashEdgePosition edge, wxDC& dc)
|
|||||||
wxPen darkShadowPen(m_darkShadowColour, 1, wxSOLID);
|
wxPen darkShadowPen(m_darkShadowColour, 1, wxSOLID);
|
||||||
wxPen lightShadowPen(m_lightShadowColour, 1, wxSOLID);
|
wxPen lightShadowPen(m_lightShadowColour, 1, wxSOLID);
|
||||||
wxPen hilightPen(m_hilightColour, 1, wxSOLID);
|
wxPen hilightPen(m_hilightColour, 1, wxSOLID);
|
||||||
wxPen blackPen(wxColour(0, 0, 0), 1, wxSOLID);
|
wxColour blackClr(0, 0, 0);
|
||||||
wxPen whitePen(wxColour(255, 255, 255), 1, wxSOLID);
|
wxColour whiteClr(255, 255, 255);
|
||||||
|
wxPen blackPen(blackClr, 1, wxSOLID);
|
||||||
|
wxPen whitePen(whiteClr, 1, wxSOLID);
|
||||||
|
|
||||||
if ( edge == wxSASH_LEFT || edge == wxSASH_RIGHT )
|
if ( edge == wxSASH_LEFT || edge == wxSASH_RIGHT )
|
||||||
{
|
{
|
||||||
|
@@ -686,7 +686,7 @@ bool wxHtmlHelpData::AddBook(const wxString& book)
|
|||||||
lineptr = ReadLine(lineptr, linebuf, 300);
|
lineptr = ReadLine(lineptr, linebuf, 300);
|
||||||
|
|
||||||
for (wxChar *ch = linebuf; *ch != wxT('\0') && *ch != wxT('='); ch++)
|
for (wxChar *ch = linebuf; *ch != wxT('\0') && *ch != wxT('='); ch++)
|
||||||
*ch = tolower(*ch);
|
*ch = (wxChar)wxTolower(*ch);
|
||||||
|
|
||||||
if (wxStrstr(linebuf, _T("title=")) == linebuf)
|
if (wxStrstr(linebuf, _T("title=")) == linebuf)
|
||||||
title = linebuf + wxStrlen(_T("title="));
|
title = linebuf + wxStrlen(_T("title="));
|
||||||
|
@@ -1674,7 +1674,7 @@ void wxHtmlHelpFrame::OnIndexFind(wxCommandEvent& event)
|
|||||||
// other items, show them as well, because they are refinements
|
// other items, show them as well, because they are refinements
|
||||||
// of the displayed index entry (i.e. it is implicitly contained
|
// of the displayed index entry (i.e. it is implicitly contained
|
||||||
// in them: "foo" with parent "bar" reads as "bar, foo"):
|
// in them: "foo" with parent "bar" reads as "bar, foo"):
|
||||||
short int level = index[i].items[0]->level;
|
int level = index[i].items[0]->level;
|
||||||
i++;
|
i++;
|
||||||
while (i < cnt && index[i].items[0]->level > level)
|
while (i < cnt && index[i].items[0]->level > level)
|
||||||
{
|
{
|
||||||
|
@@ -90,7 +90,7 @@ wxHtmlTagsCache::wxHtmlTagsCache(const wxString& source)
|
|||||||
src[pos] != wxT('>') && !wxIsspace(src[pos]);
|
src[pos] != wxT('>') && !wxIsspace(src[pos]);
|
||||||
i++, pos++ )
|
i++, pos++ )
|
||||||
{
|
{
|
||||||
tagBuffer[i] = wxToupper(src[pos]);
|
tagBuffer[i] = (wxChar)wxToupper(src[pos]);
|
||||||
}
|
}
|
||||||
tagBuffer[i] = _T('\0');
|
tagBuffer[i] = _T('\0');
|
||||||
|
|
||||||
|
@@ -513,7 +513,9 @@ wxString wxListBox::GetString(int N) const
|
|||||||
|
|
||||||
// +1 for terminating NUL
|
// +1 for terminating NUL
|
||||||
wxString result;
|
wxString result;
|
||||||
ListBox_GetText(GetHwnd(), N, wxStringBuffer(result, len + 1));
|
wxChar* buffer = result.GetWriteBuf(len + 1);
|
||||||
|
ListBox_GetText(GetHwnd(), N, buffer);
|
||||||
|
result.UngetWriteBuf();
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -805,8 +807,9 @@ bool wxListBox::MSWOnDraw(WXDRAWITEMSTRUCT *item)
|
|||||||
wxListBoxItem *pItem = (wxListBoxItem *)data;
|
wxListBoxItem *pItem = (wxListBoxItem *)data;
|
||||||
|
|
||||||
wxDCTemp dc((WXHDC)pStruct->hDC);
|
wxDCTemp dc((WXHDC)pStruct->hDC);
|
||||||
wxRect rect(wxPoint(pStruct->rcItem.left, pStruct->rcItem.top),
|
wxPoint pt1(pStruct->rcItem.left, pStruct->rcItem.top);
|
||||||
wxPoint(pStruct->rcItem.right, pStruct->rcItem.bottom));
|
wxPoint pt2(pStruct->rcItem.right, pStruct->rcItem.bottom);
|
||||||
|
wxRect rect(pt1, pt2);
|
||||||
|
|
||||||
return pItem->OnDrawItem(dc, rect,
|
return pItem->OnDrawItem(dc, rect,
|
||||||
(wxOwnerDrawn::wxODAction)pStruct->itemAction,
|
(wxOwnerDrawn::wxODAction)pStruct->itemAction,
|
||||||
|
@@ -151,11 +151,6 @@ wxRegConfig::wxRegConfig(const wxString& appName, const wxString& vendorName,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wxRegConfig::~wxRegConfig()
|
|
||||||
{
|
|
||||||
// nothing to do - key will be closed in their dtors
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// path management
|
// path management
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -482,7 +482,8 @@ static int UnknownEncodingHnd(void * WXUNUSED(encodingHandlerData),
|
|||||||
// We must build conversion table for expat. The easiest way to do so
|
// We must build conversion table for expat. The easiest way to do so
|
||||||
// is to let wxCSConv convert as string containing all characters to
|
// is to let wxCSConv convert as string containing all characters to
|
||||||
// wide character representation:
|
// wide character representation:
|
||||||
wxCSConv conv(wxString(name, wxConvLibc));
|
wxString str(name, wxConvLibc);
|
||||||
|
wxCSConv conv(str);
|
||||||
char mbBuf[2];
|
char mbBuf[2];
|
||||||
wchar_t wcBuf[10];
|
wchar_t wcBuf[10];
|
||||||
size_t i;
|
size_t i;
|
||||||
|
Reference in New Issue
Block a user