]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixes compile warnings
authorDavid Webster <Dave.Webster@bhmi.com>
Sun, 20 Mar 2005 18:51:53 +0000 (18:51 +0000)
committerDavid Webster <Dave.Webster@bhmi.com>
Sun, 20 Mar 2005 18:51:53 +0000 (18:51 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 files changed:
src/os2/accel.cpp
src/os2/bmpbuttn.cpp
src/os2/button.cpp
src/os2/choice.cpp
src/os2/fontutil.cpp
src/os2/listbox.cpp
src/os2/notebook.cpp
src/os2/popupwin.cpp
src/os2/spinbutt.cpp
src/os2/spinctrl.cpp
src/os2/textctrl.cpp
src/os2/treectrl.cpp
src/os2/utils.cpp

index e21a611fe03f6e979f0745f720e2a2c3e1121da5..044c1b28d435fd9e4ea4603b0d944c1f1f4011e4 100644 (file)
@@ -203,10 +203,6 @@ bool wxAcceleratorTable::Translate(
                              ,GetHaccel()
                              ,pMsg
                             );
-    if (rc)
-    {
-        int x = 1;
-    }
     return (Ok() && rc);
 } // end of wxAcceleratorTable::Translate
 
index 6697e119b7978a6435f990ae2ec5a80d77c53f31..f30e54aa7ec78da1e913f0ee6035e116f29fea44 100644 (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;
index 05a44eb6cc5db80a0057eaffaa307f2bd3c0e334..d75aa8258af152a2274f71c7900c935866cf8958 100644 (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
                  );
 
     //
index 5e4d3e4ad2ffa9748227ab9090db9adbdead0536..9e4e5e1378557ef75b7ce4f141c244c13ce9ef18 100644 (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;
 
index a1347e8a8e45f83f34009ec76b0e545007398ccf..264d0b7b2d2044013db17ddc7f9425004ee47e15 100644 (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!
index 350cea8f687b69b656d4730253377ff903775922..1d49e7c6016b29910d104001ccbc369aa32402b3 100644 (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;
 
index ff60f14a897643832f1c314547d28c0bf1583d4f..f792c76a6057c50f1c2f0e5363bd2dd8f80e3aaa 100644 (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
 
index b96c22d2a52ed26f348522bd4e9266a653708927..359210196040f39111171704b3f7078a3f3df625 100644 (file)
@@ -30,8 +30,6 @@
 
 #include "wx/popupwin.h"
 
-IMPLEMENT_DYNAMIC_CLASS(wxPopupWindow, wxWindow)
-
 // ============================================================================
 // implementation
 // ============================================================================
index 0bd30bf97c577b6cecc552b860df0b0bc8f0404b..3b292128b046d64a0709135bedc0fb3872876a38 100644 (file)
@@ -32,7 +32,6 @@
 extern void  wxAssociateWinWithHandle( HWND         hWnd
                                       ,wxWindowOS2* pWin
                                      );
-static WXFARPROC fnWndProcSpinCtrl = (WXFARPROC)NULL;
 
 IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent)
 
index 5328a895ea8785189870f3711838049ffc316427..7a05daa6356a6e5aba5e2b3b1e32604d48ea1db0 100644 (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);
 
index be45467059a00b41b823ed7a70da71c3e598dbd6..d315a58b5caf08293ec3da7809e4dac4e9213bf5 100644 (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);
index b043d61c7c32a008a492b67a6b0855d07ef9e856..f80fcfc47a2e232edd149cee2f87a4fab1a51a64 100644 (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)
index dad072f6ab5da4331ba8a7c506815f35f5e33963..1ee5362ef432108a6173e2d15ae2dd0950d40f01 100644 (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;