Fixes compile warnings

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster
2005-03-20 18:51:53 +00:00
parent 686a3ee080
commit 0d598bae33
13 changed files with 16 additions and 20 deletions

View File

@@ -203,10 +203,6 @@ bool wxAcceleratorTable::Translate(
,GetHaccel()
,pMsg
);
if (rc)
{
int x = 1;
}
return (Ok() && rc);
} // end of wxAcceleratorTable::Translate

View File

@@ -111,7 +111,6 @@ bool wxBitmapButton::OS2OnDraw(
return FALSE;
wxBitmap* pBitmap;
RECTL vRect;
bool bIsSelected = pUser->fsState & BDS_HILITED;
wxClientDC vDc(this);
@@ -132,7 +131,6 @@ bool wxBitmapButton::OS2OnDraw(
// Centre the bitmap in the control area
//
int nX = 0;
int nY = 0;
int nX1 = 0;
int nY1 = 0;
int nWidth = vDc.m_vRclPaint.xRight - vDc.m_vRclPaint.xLeft;

View File

@@ -141,6 +141,7 @@ wxSize wxButton::DoGetBestSize() const
int nWidthButton;
int nWidthChar;
int nHeightChar;
wxFont vFont = (wxFont)GetFont();
GetTextExtent( rsLabel
,&nWidthButton
@@ -150,7 +151,7 @@ wxSize wxButton::DoGetBestSize() const
wxGetCharSize( GetHWND()
,&nWidthChar
,&nHeightChar
,(wxFont*)&GetFont()
,&vFont
);
//

View File

@@ -360,6 +360,7 @@ wxSize wxChoice::DoGetBestSize() const
int nItems = GetCount();
int nCx;
int nCy;
wxFont vFont = (wxFont)GetFont();
for (int i = 0; i < nItems; i++)
{
@@ -386,7 +387,7 @@ wxSize wxChoice::DoGetBestSize() const
wxGetCharSize( GetHWND()
,&nCx
,&nCy
,(wxFont*)&GetFont()
,&vFont
);
nChoiceWidth += 5 * nCx;

View File

@@ -413,7 +413,7 @@ void wxFillLogFont(
}
if (*pflId == 0L)
*pflId = 1L;
for(unsigned long LCNum = 0; LCNum < lNumLids; LCNum++)
for(unsigned long LCNum = 0; LCNum < (unsigned long)lNumLids; LCNum++)
if(alIds[LCNum] == *pflId)
++*pflId;
if(*pflId > 254) // wow, no id available!

View File

@@ -725,6 +725,7 @@ wxSize wxListBox::DoGetBestSize() const
int nListbox = 0;
int nCx;
int nCy;
wxFont vFont = (wxFont)GetFont();
for (int i = 0; i < m_nNumItems; i++)
{
@@ -751,7 +752,7 @@ wxSize wxListBox::DoGetBestSize() const
wxGetCharSize( GetHWND()
,&nCx
,&nCy
,(wxFont*)&GetFont()
,&vFont
);
nListbox += 3 * nCx;

View File

@@ -319,12 +319,12 @@ bool wxNotebook::SetPageImage (
, int nImage
)
{
wxBitmap* pBitmap = (wxBitmap*)m_imageList->GetBitmap(nImage);
wxBitmap vBitmap = (wxBitmap)m_imageList->GetBitmap(nImage);
return (bool)::WinSendMsg( GetHWND()
,BKM_SETTABBITMAP
,MPFROMLONG((ULONG)m_alPageId[nPage])
,(MPARAM)pBitmap->GetHBITMAP()
,(MPARAM)vBitmap.GetHBITMAP()
);
} // end of wxNotebook::SetPageImage

View File

@@ -30,8 +30,6 @@
#include "wx/popupwin.h"
IMPLEMENT_DYNAMIC_CLASS(wxPopupWindow, wxWindow)
// ============================================================================
// implementation
// ============================================================================

View File

@@ -32,7 +32,6 @@
extern void wxAssociateWinWithHandle( HWND hWnd
,wxWindowOS2* pWin
);
static WXFARPROC fnWndProcSpinCtrl = (WXFARPROC)NULL;
IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent)

View File

@@ -214,13 +214,14 @@ wxSize wxSpinCtrl::DoGetBestSize() const
{
wxSize vSizeBtn = wxSpinButton::DoGetBestSize();
int nHeight;
wxFont vFont = (wxFont)GetFont();
vSizeBtn.x += DEFAULT_ITEM_WIDTH + MARGIN_BETWEEN;
wxGetCharSize( GetHWND()
,NULL
,&nHeight
,(wxFont*)&GetFont()
,&vFont
);
nHeight = EDIT_HEIGHT_FROM_CHAR_HEIGHT(nHeight);

View File

@@ -1188,8 +1188,9 @@ wxSize wxTextCtrl::DoGetBestSize() const
{
int nCx;
int nCy;
wxFont vFont = (wxFont)GetFont();
wxGetCharSize(GetHWND(), &nCx, &nCy, (wxFont*)&GetFont());
wxGetCharSize(GetHWND(), &nCx, &nCy, &vFont);
int wText = DEFAULT_ITEM_WIDTH;
int hText = (int)(EDIT_HEIGHT_FROM_CHAR_HEIGHT(nCy) * .8);

View File

@@ -210,7 +210,7 @@ public:
{
return true;
}
PMYRECORD pRecord = FindOS2TreeRecordByID( GetTree()->GetHWND()
PMYRECORD pRecord = FindOS2TreeRecordByID( (HWND)GetTree()->GetHWND()
,rItem.m_pItem
);
if (pRecord->m_vRecord.flRecordAttr & CRA_SELECTED)

View File

@@ -220,12 +220,12 @@ wxBatteryState wxGetBatteryState()
wxMemorySize wxGetFreeMemory()
{
void* pMemptr = NULL;
ULONG lSize;
LONG lSize;
ULONG lMemFlags;
APIRET rc;
lMemFlags = PAG_FREE;
rc = ::DosQueryMem(pMemptr, &lSize, &lMemFlags);
rc = ::DosQueryMem(pMemptr, (PULONG)&lSize, &lMemFlags);
if (rc != 0)
lSize = -1L;
return (wxMemorySize)lSize;