]> git.saurik.com Git - wxWidgets.git/commitdiff
Warning suppressions
authorDavid Webster <Dave.Webster@bhmi.com>
Mon, 1 Mar 2004 06:24:20 +0000 (06:24 +0000)
committerDavid Webster <Dave.Webster@bhmi.com>
Mon, 1 Mar 2004 06:24:20 +0000 (06:24 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

40 files changed:
src/os2/app.cpp
src/os2/bitmap.cpp
src/os2/button.cpp
src/os2/checklst.cpp
src/os2/choice.cpp
src/os2/clipbrd.cpp
src/os2/combobox.cpp
src/os2/dataobj.cpp
src/os2/dc.cpp
src/os2/dcmemory.cpp
src/os2/dcprint.cpp
src/os2/dialog.cpp
src/os2/dnd.cpp
src/os2/filedlg.cpp
src/os2/font.cpp
src/os2/fontdlg.cpp
src/os2/fontutil.cpp
src/os2/frame.cpp
src/os2/gauge.cpp
src/os2/gsocket.c
src/os2/listbox.cpp
src/os2/menu.cpp
src/os2/notebook.cpp
src/os2/ownerdrw.cpp
src/os2/palette.cpp
src/os2/radiobox.cpp
src/os2/region.cpp
src/os2/slider.cpp
src/os2/spinbutt.cpp
src/os2/spinctrl.cpp
src/os2/statbmp.cpp
src/os2/tabctrl.cpp
src/os2/textctrl.cpp
src/os2/timer.cpp
src/os2/toolbar.cpp
src/os2/toplevel.cpp
src/os2/utils.cpp
src/os2/utilsexc.cpp
src/os2/utilsgui.cpp
src/os2/window.cpp

index 40453eb43e62ed3de05ea25ad8ea93a97043b8dd..3ea50a31ca2fdb54246fc01de155b62d32360d6c 100644 (file)
@@ -298,7 +298,7 @@ bool wxApp::RegisterWindowClasses(
     {
         vError = ::WinGetLastError(vHab);
         sError = wxPMErrorToStr(vError);
-        wxLogLastError(sError);
+        wxLogLastError(sError.c_str());
         return FALSE;
     }
 
@@ -311,7 +311,7 @@ bool wxApp::RegisterWindowClasses(
     {
         vError = ::WinGetLastError(vHab);
         sError = wxPMErrorToStr(vError);
-        wxLogLastError(sError);
+        wxLogLastError(sError.c_str());
         return FALSE;
     }
 
@@ -324,7 +324,7 @@ bool wxApp::RegisterWindowClasses(
     {
         vError = ::WinGetLastError(vHab);
         sError = wxPMErrorToStr(vError);
-        wxLogLastError(sError);
+        wxLogLastError(sError.c_str());
         return FALSE;
     }
 
@@ -337,7 +337,7 @@ bool wxApp::RegisterWindowClasses(
     {
         vError = ::WinGetLastError(vHab);
         sError = wxPMErrorToStr(vError);
-        wxLogLastError(sError);
+        wxLogLastError(sError.c_str());
         return FALSE;
     }
 
@@ -350,7 +350,7 @@ bool wxApp::RegisterWindowClasses(
     {
         vError = ::WinGetLastError(vHab);
         sError = wxPMErrorToStr(vError);
-        wxLogLastError(sError);
+        wxLogLastError(sError.c_str());
         return FALSE;
     }
 
@@ -363,7 +363,7 @@ bool wxApp::RegisterWindowClasses(
     {
         vError = ::WinGetLastError(vHab);
         sError = wxPMErrorToStr(vError);
-        wxLogLastError(sError);
+        wxLogLastError(sError.c_str());
         return FALSE;
     }
 
@@ -376,7 +376,7 @@ bool wxApp::RegisterWindowClasses(
     {
         vError = ::WinGetLastError(vHab);
         sError = wxPMErrorToStr(vError);
-        wxLogLastError(sError);
+        wxLogLastError(sError.c_str());
         return FALSE;
     }
 
@@ -389,7 +389,7 @@ bool wxApp::RegisterWindowClasses(
     {
         vError = ::WinGetLastError(vHab);
         sError = wxPMErrorToStr(vError);
-        wxLogLastError(sError);
+        wxLogLastError(sError.c_str());
         return FALSE;
     }
     if (!::WinRegisterClass( vHab
@@ -401,7 +401,7 @@ bool wxApp::RegisterWindowClasses(
     {
         vError = ::WinGetLastError(vHab);
         sError = wxPMErrorToStr(vError);
-        wxLogLastError(sError);
+        wxLogLastError(sError.c_str());
         return FALSE;
     }
     return TRUE;
index 7f972810481dbb84e13f6da6177bf5c2846e44b3..9d81414df6f7f150183a2d461e298f82d3670ce9 100644 (file)
@@ -412,8 +412,6 @@ bool wxBitmap::LoadFile(
 , long                              lType
 )
 {
-    HPS                             hPs = NULLHANDLE;
-
     UnRef();
 
     wxBitmapHandler*                pHandler = wxDynamicCast( FindHandler(lType)
@@ -453,8 +451,7 @@ bool wxBitmap::Create(
 
     if (!pHandler)
     {
-        wxLogDebug(wxT("Failed to create bitmap: no bitmap handler for "
-                       "type %d defined."), lType);
+        wxLogDebug(wxT("Failed to create bitmap: no bitmap handler for type %ld defined."), lType);
 
         return(FALSE);
     }
@@ -859,7 +856,6 @@ wxImage wxBitmap::ConvertToImage() const
     BITMAPINFOHEADER2               vDIBh;
     BITMAPINFO2                     vDIBInfo;
     HPS                             hPSMem;
-    HPS                             hPS;
     HBITMAP                         hBitmap;
     HBITMAP                         hOldBitmap;
     DEVOPENSTRUC                    vDop  = {0L, "DISPLAY", NULL, 0L, 0L, 0L, 0L, 0L, 0L};
@@ -1355,9 +1351,6 @@ bool wxMask::Create(
     HDC                             hDCDst = ::DevOpenDC(vHabmain, OD_MEMORY, "*", 5L, (PDEVOPENDATA)&vDop, NULLHANDLE);
     HPS                             hPSSrc = ::GpiCreatePS(vHabmain, hDCSrc, &vSize, PU_PELS | GPIA_ASSOC);
     HPS                             hPSDst = ::GpiCreatePS(vHabmain, hDCDst, &vSize, PU_PELS | GPIA_ASSOC);
-    POINTL                          vPoint[4] = { {0 ,0}, {rBitmap.GetWidth(), rBitmap.GetHeight()},
-                                                  {0, 0}, {rBitmap.GetWidth(), rBitmap.GetHeight()}
-                                                };
 
     if (m_hMaskBitmap)
     {
index 7e0a49ebf05af21720e76140344908e14cbac59a..cb6894c3e6aa72da55f7444dc13db877bd0214cb 100644 (file)
@@ -162,7 +162,7 @@ wxSize wxButton::DoGetBestSize() const
     //
     // Need a little extra to make it look right
     //
-    nHeightButton += nHeightChar/1.5;
+    nHeightButton += (int)(nHeightChar/1.5);
 
     if (!HasFlag(wxBU_EXACTFIT))
     {
index 6c06fa391beb735cf12d405b1ff466d5acd98e7a..e1883b85451db375ed7bdaf21085869769deffca 100644 (file)
@@ -226,9 +226,6 @@ void wxCheckListBoxItem::Check (
         m_nIndex = (size_t)nIndex;
     }
 
-    HWND                            hWndListbox = (HWND)m_pParent->GetHWND();
-    RECTL                           rUpdate;
-    MRESULT                         mRc;
 
     wxCommandEvent                  vEvent( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
                                            ,m_pParent->GetId()
@@ -445,7 +442,7 @@ void wxCheckListBox::OnChar (
   wxKeyEvent&                       rEvent
 )
 {
-    if (rEvent.KeyCode() == WXK_SPACE)
+    if (rEvent.GetKeyCode() == WXK_SPACE)
         GetItem(GetSelection())->Toggle();
     else
         rEvent.Skip();
@@ -468,7 +465,7 @@ void wxCheckListBox::OnLeftClick (
                 ,&nParentHeight
                );
         vDc.SetFont(GetFont());
-        vHeight = vDc.GetCharHeight() * 2.5;
+        vHeight = (wxCoord)(vDc.GetCharHeight() * 2.5);
 
         //
         // This, of course, will not work if the LB is scrolled
index b980792934bc8a4037ee4f858c7e6517e05b1f48..793111d6b57caf85630abab30593f5c73d7635ce 100644 (file)
@@ -114,7 +114,7 @@ int wxChoice::DoAppend(
 )
 {
     int                             nIndex;
-    SHORT                           nIndexType = 0;
+    LONG                            nIndexType = 0;
 
     if (m_windowStyle & wxLB_SORT)
         nIndexType = LIT_SORTASCENDING;
@@ -140,7 +140,7 @@ int wxChoice::DoInsert(
         return DoAppend(rsItem);
 
     int                             nIndex;
-    SHORT                           nIndexType = 0;
+    LONG                            nIndexType = 0;
 
     if (m_windowStyle & wxLB_SORT)
         nIndexType = LIT_SORTASCENDING;
@@ -227,7 +227,7 @@ void wxChoice::SetString(
 , const wxString&                   rsStr
 )
 {
-    SHORT                           nIndexType = 0;
+    LONG                            nIndexType = 0;
     void*                           pData;
 
     if ( m_clientDataItemsType != wxClientData_None )
@@ -263,7 +263,7 @@ wxString wxChoice::GetString(
   int                               n
 ) const
 {
-    size_t                          nLen = 0;
+    int                             nLen = 0;
     wxString                        sStr = "";
     char*                           zBuf;
 
index 9c0ed072cfb7f18187f7b128e3e5b271029e2025..e27f3bc58a43b3fc9b509c5a4257d769b8bdac1f 100644 (file)
@@ -44,7 +44,7 @@
 #if wxUSE_DRAG_AND_DROP
     #include "wx/dataobj.h"
 
-    static bool wxSetClipboardData(wxDataObject *data);
+//    static bool wxSetClipboardData(wxDataObject *data);
 #endif
 
 // ===========================================================================
@@ -124,6 +124,7 @@ bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat)
     return FALSE;
 }
 
+#if 0
 #if wxUSE_DRAG_AND_DROP
 static bool wxSetClipboardData(wxDataObject *data)
 {
@@ -157,6 +158,7 @@ static bool wxSetClipboardData(wxDataObject *data)
     return TRUE;
 }
 #endif // wxUSE_DRAG_AND_DROP
+#endif
 
 bool wxSetClipboardData(wxDataFormat dataFormat,
                         const void *data,
@@ -281,7 +283,7 @@ bool wxSetClipboardData(wxDataFormat dataFormat,
 
 void *wxGetClipboardData(wxDataFormat dataFormat, long *len)
 {
-    void *retval = NULL;
+//  void *retval = NULL;
 // TODO:
 /*
     switch ( dataFormat )
index a3123e63472b04709cc6ca5b4305b25b05e2446b..c8e5138c7b4a02517fe88e7bb2986529a4fc1595 100644 (file)
@@ -256,7 +256,6 @@ long wxComboBox::GetInsertionPoint() const
 
 long wxComboBox::GetLastPosition() const
 {
-    HWND                            hEditWnd = GetHwnd();
     long                            lLineLength = 0L;
     WNDPARAMS                       vParams;
 
@@ -288,8 +287,6 @@ void wxComboBox::Replace(
 {
 #if wxUSE_CLIPBOARD
     HWND                            hWnd = GetHwnd();
-    long                            lFromChar = lFrom;
-    long                            lToChar = lTo;
 
     //
     // Set selection and remove it
@@ -320,8 +317,6 @@ void wxComboBox::Remove(
 {
 #if wxUSE_CLIPBOARD
     HWND                            hWnd = GetHwnd();
-    long                            lFromChar = lFrom;
-    long                            lToChar = lTo;
 
     ::WinSendMsg(hWnd, EM_SETSEL, MPFROM2SHORT((USHORT)lFrom, (USHORT)lTo), 0);
     ::WinSendMsg(hWnd, EM_CUT, (MPARAM)0, (MPARAM)0);
@@ -334,8 +329,8 @@ void wxComboBox::SetSelection(
 )
 {
     HWND                            hWnd = GetHwnd();
-    long                            lFromChar = lFrom;
-    long                            lToChar = lTo;
+    long                            lFromChar = 0;
+    long                            lToChar   = 0;
 
     //
     // If from and to are both -1, it means
index 2b1084a421630432c23bb38b80b4bbf669b2ec9c..9c94fc10e44fd812d2f3bc6cd85e2df799fc65dc 100644 (file)
 // functions
 // ----------------------------------------------------------------------------
 
-#ifdef __WXDEBUG__
-    static const wxChar *GetTymedName(DWORD tymed);
-#endif // Debug
-
 // ----------------------------------------------------------------------------
 // wxDataFormat
 // ----------------------------------------------------------------------------
index cbfbce0d33059087248a1e5869e3a9d7b875a9fb..2d3673c4b57f50c37d253e137e1af58f9f05d9d5 100644 (file)
@@ -718,8 +718,6 @@ void wxDC::DoDrawArc(
 {
      POINTL                         vPtlPos;
      POINTL                         vPtlArc[2]; // Structure for current position
-     int                            nDx;
-     int                            nDy;
      double                         dRadius;
      double                         dAngl1;
      double                         dAngl2;
@@ -756,8 +754,8 @@ void wxDC::DoDrawArc(
         // Medium point
         //
         dAnglmid = (dAngl1 + dAngl2)/2. + M_PI;
-        vXm      = vXc + dRadius * cos(dAnglmid);
-        vYm      = vYc + dRadius * sin(dAnglmid);
+        vXm      = (wxCoord)(vXc + dRadius * cos(dAnglmid));
+        vYm      = (wxCoord)(vYc + dRadius * sin(dAnglmid));
         DoDrawArc( vX1, vY1
                   ,vXm, vYm
                   ,vXc, vYc
@@ -773,8 +771,8 @@ void wxDC::DoDrawArc(
     // Medium point
     //
     dAnglmid = (dAngl1 + dAngl2)/2.;
-    vXm      = vXc + dRadius * cos(dAnglmid);
-    vYm      = vYc + dRadius * sin(dAnglmid);
+    vXm      = (wxCoord)(vXc + dRadius * cos(dAnglmid));
+    vYm      = (wxCoord)(vYc + dRadius * sin(dAnglmid));
 
     //
     // Ellipse main axis (r,q), (p,s) with center at (0,0) */
@@ -793,11 +791,11 @@ void wxDC::DoDrawArc(
     vPtlArc[1].x = vX2;
     vPtlArc[1].y = vY2;
     ::GpiPointArc(m_hPS, vPtlArc); // Draws the arc
-    CalcBoundingBox( (vXc - dRadius)
-                    ,(vYc - dRadius)
+    CalcBoundingBox( (wxCoord)(vXc - dRadius)
+                    ,(wxCoord)(vYc - dRadius)
                    );
-    CalcBoundingBox( (vXc + dRadius)
-                    ,(vYc + dRadius)
+    CalcBoundingBox( (wxCoord)(vXc + dRadius)
+                    ,(wxCoord)(vYc + dRadius)
                    );
 } // end of wxDC::DoDrawArc
 
@@ -1234,7 +1232,6 @@ void wxDC::DoDrawEllipticArc(
     FIXED                           vFSweepa; // Start angle, sweep angle
     double                          dIntPart;
     double                          dFractPart;
-    double                          dRadius;
 
     vY = OS2Y(vY,vHeight);
 
@@ -1251,8 +1248,8 @@ void wxDC::DoDrawEllipticArc(
     vArcp.lP = vWidth/2;
     vArcp.lS = 0;
     ::GpiSetArcParams(m_hPS, &vArcp); // Sets parameters to default
-    vPtlPos.x = vX + vWidth/2  * (1. + cos(DegToRad(dSa))); // Loads x-coordinate
-    vPtlPos.y = vY + vHeight/2 * (1. + sin(DegToRad(dSa))); // Loads y-coordinate
+    vPtlPos.x = (wxCoord)(vX + vWidth/2  * (1. + cos(DegToRad(dSa)))); // Loads x-coordinate
+    vPtlPos.y = (wxCoord)(vY + vHeight/2 * (1. + sin(DegToRad(dSa)))); // Loads y-coordinate
     ::GpiMove(m_hPS, &vPtlPos); // Sets current position
 
     //
@@ -1564,8 +1561,8 @@ void wxDC::DoDrawBitmap(
         }
         else
         {
-            LONG                        lOldForeGround = ::GpiQueryColor((HPS)GetHPS());
-            LONG                        lOldBackGround = ::GpiQueryBackColor((HPS)GetHPS());
+            ULONG                       lOldForeGround = ::GpiQueryColor((HPS)GetHPS());
+            ULONG                       lOldBackGround = ::GpiQueryBackColor((HPS)GetHPS());
 
             if (m_textForegroundColour.Ok())
             {
@@ -1637,10 +1634,6 @@ void wxDC::DoDrawBitmap(
                 unsigned char           cOldGreenFore = (unsigned char)(lOldForeGround >> 8);
                 unsigned char           cOldBlueFore  = (unsigned char)lOldForeGround;
 
-                unsigned char           cOldRedBack   = (unsigned char)(lOldBackGround >> 16);
-                unsigned char           cOldGreenBack = (unsigned char)(lOldBackGround >> 8);
-                unsigned char           cOldBlueBack  = (unsigned char)lOldBackGround;
-
                 unsigned char           cRedFore   = (unsigned char)(lForeGround >> 16);
                 unsigned char           cGreenFore = (unsigned char)(lForeGround >> 8);
                 unsigned char           cBlueFore  = (unsigned char)lForeGround;
@@ -1780,7 +1773,7 @@ void wxDC::DrawAnyText(
         if (m_pCanvas && m_pCanvas->IsKindOf(CLASSINFO(wxStatusBar)))
             vPtlStart.y = OS2Y(vY,vTextY);
         else
-            vPtlStart.y = OS2Y(vY,vTextY/1.5); // Full extent is a bit much
+            vPtlStart.y = (wxCoord)(OS2Y(vY,vTextY/1.5)); // Full extent is a bit much
     }
     else
     {
@@ -1791,7 +1784,7 @@ void wxDC::DrawAnyText(
             if (m_pCanvas && m_pCanvas->IsKindOf(CLASSINFO(wxStatusBar)))
                 vPtlStart.y = OS2Y(vY,vTextY);
             else
-                vPtlStart.y = OS2Y(vY,vTextY/1.5);
+                vPtlStart.y = (LONG)(OS2Y(vY,vTextY/1.5));
         }
         else
             vPtlStart.y = vY;
@@ -2277,7 +2270,7 @@ void wxDC::DoGetTextExtent(
        vErrorCode = ::WinGetLastError(wxGetInstance());
        sError = wxPMErrorToStr(vErrorCode);
        // DEBUG
-       sprintf(zMsg, "GpiQueryTextBox for %s: failed with Error: %x - %s", pStr, vErrorCode, sError.c_str());
+       sprintf(zMsg, "GpiQueryTextBox for %s: failed with Error: %lx - %s", pStr, vErrorCode, sError.c_str());
        (void)wxMessageBox( "wxWindows Menu sample"
                           ,zMsg
                           ,wxICON_INFORMATION
@@ -2873,8 +2866,8 @@ wxSize wxDC::GetPPI() const
         nPelHeight = lArray[CAPS_HEIGHT];
         nHorzRes   = lArray[CAPS_HORIZONTAL_RESOLUTION]; // returns pel/meter
         nVertRes   = lArray[CAPS_VERTICAL_RESOLUTION];   // returns pel/meter
-        nWidth   = (nHorzRes/39.3) * nPelWidth;
-        nHeight  = (nVertRes/39.3) * nPelHeight;
+        nWidth   = (int)((nHorzRes/39.3) * nPelWidth);
+        nHeight  = (int)((nVertRes/39.3) * nPelHeight);
     }
     return (wxSize(nWidth,nHeight));
 } // end of wxDC::GetPPI
index 5e2ed33694f245e22181a3e82abf5f047ec5ca69..a86c96edf654b60e16fad84c4b85dd1c9b6335f4 100644 (file)
@@ -153,9 +153,10 @@ void wxMemoryDC::SelectObject(
         //
         // Bmps drawn to are upside down, so flip it before committing
         //
-        POINTL                      vPoint[4] = { 0, m_vSelectedBitmap.GetHeight(),
-                                                  m_vSelectedBitmap.GetWidth(), 0,
-                                                  0, 0, m_vSelectedBitmap.GetWidth(), m_vSelectedBitmap.GetHeight()
+        POINTL                      vPoint[4] = { {0, m_vSelectedBitmap.GetHeight()}
+                                                 ,{m_vSelectedBitmap.GetWidth(), 0}
+                                                 ,{0, 0}
+                                                 ,{m_vSelectedBitmap.GetWidth(), m_vSelectedBitmap.GetHeight()}
                                                 };
 
 
index 77a742cf6caf984e0614879e32c839681bfef655..7497cdee968d3d6d9eacd71d0ee4212254e09daa 100644 (file)
@@ -42,7 +42,6 @@ wxPrinterDC::wxPrinterDC(
 , int                               nOrientation
 )
 {
-    LONG            lType = 0;
     DEVOPENSTRUC    vDevOpen = { (char*)rsDeviceName.c_str()
                                 ,(char*)rsDriverName.c_str()
                                 ,NULL
@@ -233,7 +232,7 @@ void wxPrinterDC::EndPage()
 //    if (m_hDC)
 //        ::EndPage((HDC) m_hDC);
 } // end of wxPrinterDC::EndPage
-
+#if 0
 // Returns default device and port names
 static bool wxGetDefaultDeviceName(
   wxString&                         rsDeviceName
@@ -295,6 +294,7 @@ static bool wxGetDefaultDeviceName(
 */
     return(TRUE);
 } // end of wxGetDefaultDeviceName
+#endif
 
 // Gets an HDC for the specified printer configuration
 WXHDC WXDLLEXPORT wxGetPrinterDC(
@@ -356,8 +356,8 @@ void wxPrinterDC::DoDrawBitmap(
 {
     wxCHECK_RET( rBmp.Ok(), _T("invalid bitmap in wxPrinterDC::DrawBitmap") );
 
-    int                             nWidth  = rBmp.GetWidth();
-    int                             nHeight = rBmp.GetHeight();
+//    int                             nWidth  = rBmp.GetWidth();
+//    int                             nHeight = rBmp.GetHeight();
 
     // TODO:
 
index 6d46d6022f557cc96fb2d4417010f25d2aa5ae4a..fb4e903b0752ff573e53ee41610d74ba185fbcd2 100644 (file)
@@ -98,14 +98,6 @@ bool wxDialog::Create(
 , const wxString&                   rsName
 )
 {
-    long                            lX = rPos.x;
-    long                            lY = rPos.y;
-    long                            lWidth = rSize.x;
-    long                            lHeight = rSize.y;
-    const char*                     zDlg;
-    WXDWORD                         dwExtendedStyle = 0L;
-    HWND                            hWnd;
-
     Init();
     SetExtraStyle(GetExtraStyle() | wxTOPLEVEL_EX_DIALOG);
 
index a8dc2ed31595e5464e0ed393f2b85448ae06f1cc..b12b6af4bbb0c3d5e4e9f1ca2c1c1038c56b97ad 100644 (file)
@@ -32,6 +32,7 @@
 // Private functions
 /////////////////////////////////////////////////////////////////////////////
 
+#if 0
 static wxDragResult ConvertDragEffectToResult (
   DWORD                             dwEffect
 )
@@ -73,6 +74,7 @@ static DWORD ConvertDragResultToEffect (
             return DO_DEFAULT;
     }
 } // end of ConvertDragResultToEffect
+#endif
 
 class CIDropTarget
 {
@@ -517,6 +519,11 @@ bool wxDropSource::GiveFeedback (
             case wxDragLink:
                 m_pDragInfo->usOperation = DO_LINK;
                 break;
+
+            case wxDragNone:
+            case wxDragCancel:
+            case wxDragError:
+                break;
         }
         return TRUE;
     }
index 7e126680c3bdb91fdcccdf15a931672afb78f2e5..13530846b842ca342bcc72d2d56c42e7bf6bd106 100644 (file)
@@ -216,7 +216,7 @@ int wxFileDialog::ShowModal()
         m_fileNames.Empty();
         if ((m_dialogStyle & wxMULTIPLE ) && vFileDlg.ulFQFCount > 1)
         {
-            for (int i = 0; i < vFileDlg.ulFQFCount; i++)
+            for (int i = 0; i < (int)vFileDlg.ulFQFCount; i++)
             {
                 if (i == 0)
                 {
@@ -263,7 +263,7 @@ int wxFileDialog::ShowModal()
                 //
                 pzExtension = sFilterBuffer.c_str();
 
-                for( int i = 0; i < sFilterBuffer.length(); i++ )
+                for( int i = 0; i < (int)sFilterBuffer.length(); i++ )
                 {
                     //
                     // Get extension
index 5588a0a0134688d7347ea163d0c930543c3d1dc5..517053a9155ed3e5f432b5636608b87a32ff20b9 100644 (file)
@@ -376,8 +376,6 @@ bool wxFontRefData::Alloc(
     wxString                        sFaceName;
     long                            flId = m_hFont;
     long                            lRc;
-    short                           nIndex = 0;
-    PFONTMETRICS                    pFM = NULL;
     ERRORID                         vError;
     wxString                        sError;
 
index e1998a8058e1c0fdd8526b8a8e4b26ae5f623f8d..c2b6091965909b508023027ee8bda1f6cef0d73e 100644 (file)
@@ -40,7 +40,6 @@ int wxFontDialog::ShowModal()
     FONTDLG                         vFontDlg;
     char                            zCurrentFont[FACESIZE];
     HWND                            hWndFontDlg;
-    FONTMETRICS                     vFm;
     FACENAMEDESC                    vFn;
 
     memset(&vFontDlg, '\0', sizeof(FONTDLG));
index d0e497a31b064517f12c741613c1fe41d52ef076..a1347e8a8e45f83f34009ec76b0e545007398ccf 100644 (file)
@@ -392,7 +392,6 @@ void wxFillLogFont(
     // font, so now we need to generate an ID
     //
     long                            lNumLids = ::GpiQueryNumberSetIds(*phPS);
-    long                            lGpiError;
 
     if(lNumLids )
     {
@@ -465,17 +464,12 @@ void wxOS2SelectMatchingFontByName(
 )
 {
     int                             i;
-    int                             nDiff0;
     int                             nPointSize;
-    int                             nDiff;
     int                             nIs;
-    int                             nMinDiff;
     int                             nMinDiff0;
-    int                             nApirc;
     int                             anDiff[16];
     int                             anMinDiff[16];
     int                             nIndex = 0;
-    STR8                            zFn;
     char                            zFontFaceName[FACESIZE];
     wxString                        sFaceName;
     USHORT                          usWeightClass;
index 96743fc97989fc92e1a7530cbbafcbd145d6573c..f5024c8eb4ade77ea2ef87088190b36e92da649e 100644 (file)
@@ -180,8 +180,6 @@ void wxFrame::DoSetClientSize(
 , int                               nHeight
 )
 {
-    wxStatusBar*                    pStatusBar = GetStatusBar();
-
     //
     // Statusbars are not part of the OS/2 Client but parent frame
     // so no statusbar consideration
@@ -217,8 +215,6 @@ wxStatusBar* wxFrame::OnCreateStatusBar(
 )
 {
     wxStatusBar*                    pStatusBar = NULL;
-    SWP                             vSwp;
-    ERRORID                         vError;
     wxString                        sError;
 
     pStatusBar = wxFrameBase::OnCreateStatusBar( nNumber
@@ -281,7 +277,6 @@ void wxFrame::PositionStatusBar()
         int                         nY;
         int                         nStatbarWidth;
         int                         nStatbarHeight;
-        HWND                        hWndClient;
         RECTL                       vRect;
         RECTL                       vFRect;
 
@@ -355,17 +350,7 @@ void wxFrame::SetMenuBar(
   wxMenuBar*                        pMenuBar
 )
 {
-    ERRORID                         vError;
     wxString                        sError;
-    HWND                            hTitlebar = NULLHANDLE;
-    HWND                            hHScroll = NULLHANDLE;
-    HWND                            hVScroll = NULLHANDLE;
-    HWND                            hMenuBar = NULLHANDLE;
-    SWP                             vSwp;
-    SWP                             vSwpTitlebar;
-    SWP                             vSwpVScroll;
-    SWP                             vSwpHScroll;
-    SWP                             vSwpMenu;
 
     if (!pMenuBar)
     {
@@ -738,10 +723,8 @@ void wxFrame::PositionToolBar()
     if (!pToolBar)
         return;
 
-    HWND                            hWndClient;
     RECTL                           vRect;
     RECTL                           vFRect;
-    SWP                             vSwp;
     wxPoint                         vPos;
 
     ::WinQueryWindowRect(m_hFrame, &vRect);
@@ -899,7 +882,6 @@ bool wxFrame::HandlePaint()
 
             if (hIcon)
             {
-                HWND                            hWndClient;
                 RECTL                           vRect3;
 
                 ::WinQueryWindowRect(GetHwnd(), &vRect3);
@@ -1227,7 +1209,6 @@ MRESULT EXPENTRY wxFrameWndProc(
     //
 
     MRESULT                         rc = (MRESULT)0;
-    bool                            bProcessed = FALSE;
 
     //
     // Stop right here if we don't have a valid handle in our wxWindow object.
@@ -1325,8 +1306,6 @@ MRESULT wxFrame::OS2WindowProc(
 
         case WM_SIZE:
             {
-                SHORT               nScxold = SHORT1FROMMP(wParam); // Old horizontal size.
-                SHORT               nScyold = SHORT2FROMMP(wParam); // Old vertical size.
                 SHORT               nScxnew = SHORT1FROMMP(lParam); // New horizontal size.
                 SHORT               nScynew = SHORT2FROMMP(lParam); // New vertical size.
 
index 0cedb8047f69f8715b0646eb61d49c0d9797da82..3ad621de7393ce08c5d3fea0de7086f024c7d79a 100644 (file)
@@ -37,9 +37,6 @@ MRESULT EXPENTRY wxGaugeWndProc(
     wxGauge*                        pGauge = (wxGauge *)::WinQueryWindowULong( hWnd
                                                                               ,QWL_USER
                                                                              );
-    wxWindowOS2*                    pWindow = NULL;
-    MRESULT                         rc = (MRESULT)0;
-    bool                            bProcessed = FALSE;
     HPS                             hPS;
     RECTL                           vRect;
     RECTL                           vRect2;
index bda9f5f0356470d9f7e63f49488ba7e5e8ada796..b57aa868d27b6c2508d45c51e7f158c915bb46bc 100644 (file)
@@ -1654,7 +1654,7 @@ GSocketError GAddress_INET_SetPortName(GAddress *address, const char *port,
     return GSOCK_INVPORT;
   }
  
-  se = getservbyname(port, protocol);
+  se = getservbyname(port, (char*)protocol);
   if (!se)
   {
     /* the cast to int suppresses compiler warnings about subscript having the
index 6d56ce18909a32c3dad9b9201f0a3257528b0ed4..ddb02f53b48aeef9c13baf262e221be4cd165f9f 100644 (file)
@@ -281,31 +281,30 @@ int wxListBox::DoAppend(
   const wxString&                   rsItem
 )
 {
-    int                             nIndex = 0;
-    SHORT                           nIndexType = 0;
+    long                            lIndex = 0;
+    LONG                            lIndexType = 0;
 
     if (m_windowStyle & wxLB_SORT)
-        nIndexType = LIT_SORTASCENDING;
+        lIndexType = LIT_SORTASCENDING;
     else
-        nIndexType = LIT_END;
-    nIndex = (int)::WinSendMsg(GetHwnd(), LM_INSERTITEM, (MPARAM)nIndexType, (MPARAM)rsItem.c_str());
+        lIndexType = LIT_END;
+    lIndex = (long)::WinSendMsg(GetHwnd(), LM_INSERTITEM, (MPARAM)lIndexType, (MPARAM)rsItem.c_str());
     m_nNumItems++;
 
 #if wxUSE_OWNER_DRAWN
     if (m_windowStyle & wxLB_OWNERDRAW)
     {
-        wxOwnerDrawn*               pNewItem = CreateItem(nIndex); // dummy argument
+        wxOwnerDrawn*               pNewItem = CreateItem(lIndex); // dummy argument
         wxScreenDC                  vDc;
-        wxCoord                     vHeight;
 
 
         pNewItem->SetName(rsItem);
-        m_aItems.Insert(pNewItem, nIndex);
-        ::WinSendMsg(GetHwnd(), LM_SETITEMHANDLE, (MPARAM)((SHORT)nIndex), MPFROMP(pNewItem));
+        m_aItems.Insert(pNewItem, lIndex);
+        ::WinSendMsg(GetHwnd(), LM_SETITEMHANDLE, (MPARAM)lIndex, MPFROMP(pNewItem));
         pNewItem->SetFont(GetFont());
     }
 #endif
-    return nIndex;
+    return (int)lIndex;
 } // end of wxListBox::DoAppend
 
 void wxListBox::DoSetItems(
@@ -314,9 +313,8 @@ void wxListBox::DoSetItems(
 )
 {
     BOOL                            bHideAndShow = IsShown();
-    int                             nCount = 0;
     int                             i;
-    SHORT                           nIndexType = 0;
+    LONG                            lIndexType = 0;
 
     if (bHideAndShow)
     {
@@ -328,10 +326,10 @@ void wxListBox::DoSetItems(
     {
 
         if (m_windowStyle & wxLB_SORT)
-            nIndexType = LIT_SORTASCENDING;
+            lIndexType = LIT_SORTASCENDING;
         else
-            nIndexType = LIT_END;
-        ::WinSendMsg(GetHwnd(), LM_INSERTITEM, (MPARAM)nIndexType, (MPARAM)raChoices[i].c_str());
+            lIndexType = LIT_END;
+        ::WinSendMsg(GetHwnd(), LM_INSERTITEM, (MPARAM)lIndexType, (MPARAM)raChoices[i].c_str());
 
         if (ppClientData)
         {
@@ -635,7 +633,7 @@ void wxListBox::DoInsertItems(
         m_aItems.Insert(pNewItem, nIndex);
         ::WinSendMsg( GetHwnd()
                      ,LM_SETITEMHANDLE
-                     ,(MPARAM)((SHORT)nIndex)
+                     ,(MPARAM)((LONG)nIndex)
                      ,MPFROMP(pNewItem)
                     );
         m_nNumItems += nItems;
@@ -857,7 +855,7 @@ long wxListBox::OS2OnMeasure(
     pMeasureStruct->rclItem.yTop   = 0;
     pMeasureStruct->rclItem.yBottom = 0;
 
-    vHeight = vDc.GetCharHeight() * 2.5;
+    vHeight = (wxCoord)(vDc.GetCharHeight() * 2.5);
     pMeasureStruct->rclItem.yTop  = (USHORT)vHeight;
 
     return long(MRFROM2SHORT((USHORT)vHeight, (USHORT)vWidth));
index 09b81199006ab1c1d721c3fb23ce04322541d983..89d968065d240da1ab429dcf14df738238c2e585 100644 (file)
@@ -202,7 +202,7 @@ void wxMenu::UpdateAccel(
         //
         size_t                      n = FindAccel(pItem->GetId());
 
-        if (n == wxNOT_FOUND)
+        if (n == (size_t)wxNOT_FOUND)
         {
             //
             // No old, add new if any
@@ -247,7 +247,6 @@ bool wxMenu::DoInsertOrAppend(
 
     ERRORID                         vError;
     wxString                        sError;
-    char                            zMsg[128];
 
 #if wxUSE_ACCEL
     UpdateAccel(pItem);
@@ -331,7 +330,6 @@ bool wxMenu::DoInsertOrAppend(
 #if wxUSE_OWNER_DRAWN
     if (pItem->IsOwnerDrawn())
     {
-        BOOL                       rc;
         MENUITEM                   vMenuItem;
 
         ::WinSendMsg( GetHmenu()
@@ -343,7 +341,7 @@ bool wxMenu::DoInsertOrAppend(
                     );
     }
 #endif
-    if (rc == MIT_MEMERROR || rc == MIT_ERROR)
+    if (rc == (APIRET)MIT_MEMERROR || rc == (APIRET)MIT_ERROR)
     {
         vError = ::WinGetLastError(vHabmain);
         sError = wxPMErrorToStr(vError);
@@ -601,7 +599,7 @@ bool wxMenu::OS2Command(
         SendEvent( vId
                   ,(int)::WinSendMsg( GetHmenu()
                                      ,MM_QUERYITEMATTR
-                                     ,(MPARAM)vId
+                                     ,MPFROMSHORT(vId)
                                      ,(MPARAM)MIA_CHECKED
                                     )
                  );
@@ -730,7 +728,6 @@ void wxMenuBar::Refresh()
 
 WXHMENU wxMenuBar::Create()
 {
-    MENUITEM                        vItem;
     HWND                            hFrame;
 
     if (m_hMenu != 0 )
@@ -799,7 +796,7 @@ WXHMENU wxMenuBar::Create()
             m_menus[i]->m_vMenuData.iPosition = i;
 
             rc = (APIRET)::WinSendMsg(m_hMenu, MM_INSERTITEM, (MPARAM)&m_menus[i]->m_vMenuData, (MPARAM)m_titles[i].c_str());
-            if (rc == MIT_MEMERROR || rc == MIT_ERROR)
+            if (rc == (APIRET)MIT_MEMERROR || rc == (APIRET)MIT_ERROR)
             {
                 vError = ::WinGetLastError(vHabmain);
                 sError = wxPMErrorToStr(vError);
index 59818d3529fea37391b2dbe2164a5166be1f8c55..f79c9f0c29eeb4f7229b42615b1f3e3e72855f11 100644 (file)
@@ -189,9 +189,6 @@ WXDWORD wxNotebook::OS2GetStyle (
 
 size_t wxNotebook::GetPageCount() const
 {
-    int                             nPageInternal = m_pages.Count();
-    int                             nPageAPI = (int)::WinSendMsg(GetHWND(), BKM_QUERYPAGECOUNT, (MPARAM)0, (MPARAM)BKA_END);
-
     //
     // Consistency check
     //
@@ -214,7 +211,7 @@ int wxNotebook::SetSelection(
 {
     wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, wxT("notebook page out of range") );
 
-    if (nPage != m_nSelection)
+    if (nPage != (size_t)m_nSelection)
     {
         wxNotebookEvent             vEvent( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING
                                            ,m_windowId
@@ -232,8 +229,6 @@ int wxNotebook::SetSelection(
             vEvent.SetEventType(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED);
             GetEventHandler()->ProcessEvent(vEvent);
 
-            ULONG                   ulPageId = (ULONG)m_alPageId[nPage];
-
             ::WinSendMsg( GetHWND()
                          ,BKM_TURNTOPAGE
                          ,MPFROMLONG((ULONG)m_alPageId[nPage])
@@ -251,10 +246,6 @@ bool wxNotebook::SetPageText(
 )
 {
     wxCHECK_MSG( IS_VALID_PAGE(nPage), FALSE, wxT("notebook page out of range") );
-
-
-    ULONG                           ulPageId = (ULONG)m_alPageId[nPage];
-
     return (bool)::WinSendMsg( m_hWnd
                               ,BKM_SETTABTEXT
                               ,MPFROMLONG((ULONG)m_alPageId[nPage])
@@ -273,9 +264,6 @@ wxString wxNotebook::GetPageText (
 
     wxCHECK_MSG( IS_VALID_PAGE(nPage), wxT(""), wxT("notebook page out of range") );
 
-
-    ULONG                           ulPageId = (ULONG)m_alPageId[nPage];
-
     memset(&vBookText, '\0', sizeof(BOOKTEXT));
     vBookText.textLen = 0; // This will get the length
     ulRc = LONGFROMMR(::WinSendMsg( m_hWnd
@@ -283,9 +271,9 @@ wxString wxNotebook::GetPageText (
                                    ,MPFROMLONG((ULONG)m_alPageId[nPage])
                                    ,MPFROMP(&vBookText)
                                   ));
-    if (ulRc == BOOKERR_INVALID_PARAMETERS || ulRc == 0L)
+    if (ulRc == (ULONG)BOOKERR_INVALID_PARAMETERS || ulRc == 0L)
     {
-        if (ulRc == BOOKERR_INVALID_PARAMETERS)
+        if (ulRc == (ULONG)BOOKERR_INVALID_PARAMETERS)
         {
             wxLogError(wxT("Invalid Page Id for page text querry."));
         }
@@ -302,7 +290,7 @@ wxString wxNotebook::GetPageText (
                                    ,MPFROMLONG((ULONG)m_alPageId[nPage])
                                    ,MPFROMP(&vBookText)
                                   ));
-    if (ulRc == BOOKERR_INVALID_PARAMETERS || ulRc == 0L)
+    if (ulRc == (ULONG)BOOKERR_INVALID_PARAMETERS || ulRc == 0L)
     {
         return wxEmptyString;
     }
@@ -333,9 +321,6 @@ bool wxNotebook::SetPageImage (
 {
     wxBitmap*                       pBitmap = (wxBitmap*)m_imageList->GetBitmap(nImage);
 
-
-    ULONG                           ulPageId = (ULONG)m_alPageId[nPage];
-
     return (bool)::WinSendMsg( GetHWND()
                               ,BKM_SETTABBITMAP
                               ,MPFROMLONG((ULONG)m_alPageId[nPage])
@@ -415,9 +400,6 @@ wxNotebookPage* wxNotebook::DoRemovePage (
     if (!pPageRemoved)
         return NULL;
 
-
-    ULONG                           ulPageId = (ULONG)m_alPageId[nPage];
-
     ::WinSendMsg( GetHWND()
                  ,BKM_DELETEPAGE
                  ,MPFROMLONG((ULONG)m_alPageId[nPage])
@@ -437,14 +419,14 @@ wxNotebookPage* wxNotebook::DoRemovePage (
         //
         int                         nSelNew;
 
-        if (m_nSelection == GetPageCount())
+        if (m_nSelection == (int)GetPageCount())
         {
             //
             // Last page deleted, make the new last page the new selection
             //
             nSelNew = m_nSelection - 1;
         }
-        else if (nPage <= m_nSelection)
+        else if (nPage <= (size_t)m_nSelection)
         {
             //
             // We must show another page, even if it has the same index
@@ -594,7 +576,7 @@ bool wxNotebook::InsertPage (
     // If the inserted page is before the selected one, we must update the
     // index of the selected page
     //
-    if (nPage <= m_nSelection)
+    if (nPage <= (size_t)m_nSelection)
     {
         //
         // One extra page added
@@ -622,7 +604,7 @@ bool wxNotebook::InsertPage (
 
     vDC.GetTextExtent(rsStrText, &nTextX, &nTextY);
     nTextY *= 2;
-    nTextX *= 1.3;
+    nTextX  = (wxCoord)(nTextX * 1.3);
     if (nTextX > m_nTabSize)
     {
         m_nTabSize = nTextX;
@@ -730,7 +712,7 @@ void wxNotebook::OnSelChange (
 
         for (nSel = 0; nSel < nPageCount; nSel++)
         {
-            if (ulOS2Sel == m_alPageId[nSel])
+            if (ulOS2Sel == (ULONG)m_alPageId[nSel])
             {
                 bFound = TRUE;
                 break;
@@ -748,7 +730,7 @@ void wxNotebook::OnSelChange (
 
         for (nSel = 0; nSel < nPageCount; nSel++)
         {
-            if (ulOS2Sel == m_alPageId[nSel])
+            if (ulOS2Sel == (ULONG)m_alPageId[nSel])
             {
                 bFound = TRUE;
                 break;
index 3bc612cae4ed1130153ece28fee0406cbfbfb556..12b76cc401358476f6d1515ded7bba67f89ae953 100644 (file)
@@ -111,7 +111,7 @@ bool wxOwnerDrawn::OnMeasureItem(
     // Add space at the end of the menu for the submenu expansion arrow
     // this will also allow offsetting the accel string from the right edge
     //
-    *pWidth += GetDefaultMarginWidth() * 1.5;
+    *pWidth = (size_t)(*pWidth + GetDefaultMarginWidth() * 1.5);
 
     //
     // JACS: items still look too tightly packed, so adding 5 pixels.
@@ -303,7 +303,7 @@ bool wxOwnerDrawn::OnDrawItem(
     wxString                        sTgt = "\t";
     wxString                        sFullString = m_strName; // need to save the original text
     wxString                        sAccel;
-    size_t                          nIndex;
+    int                             nIndex;
     size_t                          nWidth;
     size_t                          nCharWidth;
     size_t                          nHeight;
@@ -336,7 +336,7 @@ bool wxOwnerDrawn::OnDrawItem(
                           ,(long *)&nWidth
                           ,(long *)&nHeight
                          );
-        sTmp = sFullString[nIndex + 1];
+        sTmp = sFullString[(size_t)(nIndex + 1)];
         rDC.GetTextExtent( sTmp
                           ,(long *)&nCharWidth
                           ,(long *)&nHeight
@@ -464,11 +464,6 @@ bool wxOwnerDrawn::OnDrawItem(
 
             if (eStatus & wxODSelected)
             {
-                RECT                vRectBmp = { rRect.x
-                                                ,rRect.y
-                                                ,rRect.x + GetMarginWidth() - 1
-                                                ,rRect.y + m_nHeight - 1
-                                               };
                 POINTL              vPnt1 = {rRect.x + 1, rRect.y + 3}; // Leave a little background border
                 POINTL              vPnt2 = {rRect.x + GetMarginWidth(), rRect.y + m_nHeight - 3};
 
index bd592c42e0bfaa4d5945952736b01a466684bea6..43252c40700a2b5f0d12e20c7a574838a0d0c82f 100644 (file)
@@ -153,7 +153,7 @@ int wxPalette::GetPixel(
     //
     // Now loop through and find the matching entry
     //
-    int                             i;
+    ULONG                           i;
     for (i = 0; i < ulNumEntries; i++)
     {
         if (pualTable[i] == ulRGB)
index ce228dc3102830798b20b4b4f5195ce5b4db5ad0..ef06f20c8a4255960869ea0579ae66d5b3aa434a 100644 (file)
@@ -107,8 +107,6 @@ void wxRadioBox::AdjustButtons(
     int                             nStartY;
     int                             nMaxWidth;
     int                             nMaxHeight;
-    int                             nTotWidth;
-    int                             nTotHeight;
 
     wxGetCharSize( m_hWnd
                   ,&nCx1
@@ -318,12 +316,6 @@ bool wxRadioBox::Create(
         return FALSE;
 
     wxAssociateWinWithHandle(m_hWnd, this);
-#if RADIOBTN_PARENT_IS_RADIOBOX
-    HWND                            hWndParent = GetHwnd();
-#else
-    HWND                            hWndParent = GetHwndOf(pParent);
-#endif
-    HFONT                           hFont;
 
     //
     // Some radio boxes test consecutive id.
@@ -1041,8 +1033,6 @@ bool wxRadioBox::SetFont(
     //
     // Also set the font of our radio buttons
     //
-    WXHFONT                         hFont = wxFont(rFont).GetResourceHandle();
-
     for (int n = 0; n < (int)m_nNoItems; n++)
     {
         HWND                        hWndBtn = (HWND)m_ahRadioButtons[n];
@@ -1099,8 +1089,6 @@ bool wxRadioBox::Show(
   bool                              bShow
 )
 {
-    int                             nCmdShow = 0;
-
     if (!wxControl::Show(bShow))
         return FALSE;
 
@@ -1127,8 +1115,6 @@ void wxRadioBox::SubclassRadioButton(
   WXHWND                            hWndBtn
 )
 {
-    HWND                            hwndBtn = (HWND)hWndBtn;
-
     fnWndProcRadioBtn = (WXFARPROC)::WinSubclassWindow(hWndBtn, (PFNWP)wxRadioBtnWndProc);
 } // end of wxRadioBox::SubclassRadioButton
 
index b596d335f66ce8f6eeeb306c1117d2e36bb551d0..039534285ef9c0f49a848591f6df0b4ff355deea 100644 (file)
@@ -439,7 +439,6 @@ wxRegionContain wxRegion::Contains(
 , wxCoord                           y
 ) const
 {
-    bool                            bOK = FALSE;
     POINTL                          vPoint;
 
     vPoint.x = x;
index 0a6eb8f9854990a7d3d4549c571330f4ae206c1a..7662c87bfbac6ba6ba034d712042d4b547ef9d7e 100644 (file)
@@ -58,7 +58,6 @@ void wxSlider::AdjustSubControls(
 , int                               nSizeFlags
 )
 {
-    SWP                             vSwp;
     int                             nXOffset = nX;
     int                             nYOffset = nY;
     int                             nCx;     // slider,min,max sizes
@@ -552,7 +551,7 @@ void wxSlider::DoSetSize(
                 ::WinSetWindowPos( (HWND)m_hStaticValue
                                   ,HWND_TOP
                                   ,(LONG)nXOffset
-                                  ,(LONG)nYOffset - (nCyf * 1.2)
+                                  ,(LONG)nYOffset - (LONG)(nCyf * 1.2)
                                   ,(LONG)nNewWidth
                                   ,(LONG)nValueHeight
                                   ,SWP_ZORDER | SWP_SIZE | SWP_MOVE | SWP_SHOW
@@ -562,7 +561,7 @@ void wxSlider::DoSetSize(
             ::WinSetWindowPos( (HWND)m_hStaticMin
                               ,HWND_TOP
                               ,(LONG)nXOffset
-                              ,(LONG)nYOffset - (nCyf * 1.2)
+                              ,(LONG)nYOffset - (LONG)(nCyf * 1.2)
                               ,(LONG)nMinLen
                               ,(LONG)nCy
                               ,SWP_ZORDER | SWP_SIZE | SWP_MOVE | SWP_SHOW
@@ -602,7 +601,7 @@ void wxSlider::DoSetSize(
             ::WinSetWindowPos( (HWND)m_hStaticMax
                               ,HWND_TOP
                               ,(LONG)nXOffset
-                              ,(LONG)nYOffset - (nCyf * 1.2)
+                              ,(LONG)nYOffset - (LONG)(nCyf * 1.2)
                               ,(LONG)nMaxLen
                               ,(LONG)nCy
                               ,SWP_ZORDER | SWP_SIZE | SWP_MOVE | SWP_SHOW
@@ -961,7 +960,7 @@ bool wxSlider::OS2OnScroll(
                                                                           ,(MPARAM)0
                                                                          )
                                                             );
-    nNewPos = (nPixelPos/m_dPixelToRange);
+    nNewPos = (int)(nPixelPos/m_dPixelToRange);
     if (nNewPos > (m_nRangeMax - m_nRangeMin)/2)
         nNewPos++;
     if ((nNewPos < GetMin()) || (nNewPos > GetMax()))
@@ -1080,7 +1079,7 @@ void wxSlider::SetTick(
   int                               nTickPos
 )
 {
-    nTickPos *= m_dPixelToRange;
+    nTickPos = (int)(nTickPos * m_dPixelToRange);
     ::WinSendMsg( GetHwnd()
                  ,SLM_ADDDETENT
                  ,MPFROMSHORT(nTickPos)
@@ -1118,7 +1117,7 @@ void wxSlider::SetTickFreq(
     ::WinSendMsg(GetHwnd(), WM_SETWINDOWPARAMS, (MPARAM)&vWndParams, (MPARAM)0);
     for (i = 1; i < (m_nRangeMax - m_nRangeMin)/n; i++)
     {
-        nPixelPos = i * n * m_dPixelToRange;
+        nPixelPos = (int)(i * n * m_dPixelToRange);
         ::WinSendMsg( GetHwnd()
                      ,SLM_ADDDETENT
                      ,MPFROMSHORT(nPixelPos)
@@ -1131,14 +1130,6 @@ void wxSlider::SetValue(
   int                               nValue
 )
 {
-    int                             nPixelPos = SHORT1FROMMR(::WinSendMsg( GetHwnd()
-                                                                          ,SLM_QUERYSLIDERINFO
-                                                                          ,MPFROM2SHORT( SMA_SLIDERARMPOSITION
-                                                                                        ,SMA_RANGEVALUE
-                                                                                       )
-                                                                          ,(MPARAM)0
-                                                                         )
-                                                            );
     int                             nPixelRange = SHORT1FROMMR(::WinSendMsg( GetHwnd()
                                                                             ,SLM_QUERYSLIDERINFO
                                                                             ,MPFROM2SHORT( SMA_SHAFTDIMENSIONS
index 2103d2c98b9ae1008919245bde557f72dc64613f..8c20f45f39d6d4ba96d91b9d2da27c593d2b1545 100644 (file)
@@ -179,7 +179,6 @@ wxSize wxSpinButton::DoGetBestSize() const
 
 int wxSpinButton::GetValue() const
 {
-    int                             nVal = 0;
     long                            lVal = 0L;
     char                            zVal[10];
 
index d5fb52d270ef35df9f2320d0bd52c86ce99031de..5129a3bc85928ba3179114d95a3e1ca51db456bb 100644 (file)
@@ -73,8 +73,7 @@ MRESULT EXPENTRY wxSpinCtrlWndProc(
     wxSpinCtrl*                    pSpin = (wxSpinCtrl *)::WinQueryWindowULong( hWnd
                                                                                ,QWL_USER
                                                                               );
-    bool                            bProccesed = FALSE;
-    MRESULT                         rc = (MRESULT)0;
+
     //
     // Forward some messages (the key ones only so far) to the spin ctrl
     //
@@ -347,7 +346,7 @@ void wxSpinCtrl::OnChar (
   wxKeyEvent&                       rEvent
 )
 {
-    switch (rEvent.KeyCode())
+    switch (rEvent.GetKeyCode())
     {
         case WXK_RETURN:
             {
@@ -474,7 +473,6 @@ bool wxSpinCtrl::SetFont(
         return FALSE;
     }
 
-    WXHANDLE                        hFont = GetFont().GetResourceHandle();
     wxOS2SetFont( m_hWnd
                  ,rFont
                 );
index 3d18ef8976cdd22aafde66f297ebb28a910c5ffa..09af143f46a4075e1f8a14d44f824cf8c54331d8 100644 (file)
@@ -97,8 +97,6 @@ bool wxStaticBitmap::Create(
 
     int                             nX= rPos.x;
     int                             nY = rPos.y;
-    int                             nWidth = rSize.x;
-    int                             nHeight = rSize.y;
     char                            zId[16];
 
     m_windowStyle = lStyle;
@@ -164,7 +162,6 @@ void wxStaticBitmap::OnPaint (
 )
 {
     wxPaintDC                       vDc(this);
-    int                             i;
     wxBitmap*                       pBitmap;
 
     if (m_pImage->IsKindOf(CLASSINFO(wxIcon)))
index 2894ebf86e1099832e73d2ab726cd37fca377983..1b664f8b16d864cc0b44801622af4273548cc255 100644 (file)
@@ -59,8 +59,6 @@ bool wxTabCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, cons
 
     SetParent(parent);
 
-    DWORD msflags = 0;
-
     if (width <= 0)
         width = 100;
     if (height <= 0)
@@ -72,8 +70,6 @@ bool wxTabCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, cons
 
     m_windowId = (id < 0 ? NewControlId() : id);
 
-    long tabStyle = 0;
-
     // Create the toolbar control.
     HWND hWndTabCtrl = 0;
     // TODO: create tab control
index 0f801323ef68f160055151ee297fa7865de26428..c6bd6d1dd642aff6bc3309521fdb0f768f4f588f 100644 (file)
@@ -101,9 +101,6 @@ bool wxTextCtrl::Create(
 , const wxString&                   rsName
 )
 {
-    HWND                            hParent;
-    int                             nTempy;
-
     //
     // Base initialization
     //
@@ -607,8 +604,6 @@ void wxTextCtrl::Replace(
 {
 #if wxUSE_CLIPBOARD
     HWND                            hWnd      = GetHwnd();
-    long                            lFromChar = lFrom;
-    long                            lToChar   = lTo;
 
     //
     // Set selection and remove it
@@ -645,8 +640,6 @@ void wxTextCtrl::Remove(
 )
 {
     HWND                            hWnd      = GetHwnd();
-    long                            lFromChar = lFrom;
-    long                            lToChar   = lTo;
 
     if (m_bIsMLE)
     {
@@ -749,7 +742,6 @@ long wxTextCtrl::XYToPosition(
 , long                              lY
 ) const
 {
-    HWND                            hWnd = GetHwnd();
     long                            lCharIndex = 0L;
     long                            lLen;
 
@@ -1012,7 +1004,6 @@ WXHBRUSH wxTextCtrl::OnCtlColor(
 )
 {
     HPS                             hPS = (HPS)hWxDC;
-    wxBrush*                        pBrush = NULL;
     wxColour                        vColBack = GetBackgroundColour();
     wxColour                        vColFore = GetForegroundColour();
     wxBrush*                        pBackgroundBrush = wxTheBrushList->FindOrCreateBrush( GetBackgroundColour()
@@ -1047,7 +1038,7 @@ void wxTextCtrl::OnChar(
   wxKeyEvent&                       rEvent
 )
 {
-    switch (rEvent.KeyCode())
+    switch (rEvent.GetKeyCode())
     {
         case WXK_RETURN:
             if ( !(m_windowStyle & wxTE_MULTILINE) )
@@ -1202,7 +1193,7 @@ wxSize wxTextCtrl::DoGetBestSize() const
     wxGetCharSize(GetHWND(), &nCx, &nCy, (wxFont*)&GetFont());
 
     int                             wText = DEFAULT_ITEM_WIDTH;
-    int                             hText = (EDIT_HEIGHT_FROM_CHAR_HEIGHT(nCy) * .8);
+    int                             hText = (int)(EDIT_HEIGHT_FROM_CHAR_HEIGHT(nCy) * .8);
 
     if (m_windowStyle & wxTE_MULTILINE)
     {
index f102ace512ef8a7204c1a899deb05958f20751ae..e01bedb5523cf5b3390fe8c4c8f23b83c50b0e90 100644 (file)
@@ -169,7 +169,7 @@ ULONG wxTimerProc(
 
     wxCHECK_MSG(pNode, 0, wxT("bogus timer id in wxTimerProc") );
     if (pNode)
-      wxProcessTimer(*(wxTimer *)pNode->Data());
+      wxProcessTimer(*(wxTimer *)pNode->GetData());
     return 0;
 }
 
index b15b06f79ac26a4875eb5865654b4fd28a0406ad..82dd46c560bf6b6d7d4c365519254c2e19a0b067 100644 (file)
@@ -379,7 +379,6 @@ bool wxToolBar::Create(
     int                             nY      = rPos.y;
     int                             nWidth  = rSize.x;
     int                             nHeight = rSize.y;
-    wxFrame*                        pFrame = wxDynamicCast(GetParent(), wxFrame);
 
     if (lStyle & wxTB_HORIZONTAL)
     {
@@ -435,8 +434,6 @@ bool wxToolBar::Realize()
 {
     int                             nMaxToolWidth  = 0;
     int                             nMaxToolHeight = 0;
-    int                             nX;
-    int                             nY;
 
     m_nCurrentRowsOrColumns = 0;
     m_vLastX               = m_xMargin;
@@ -847,7 +844,6 @@ void wxToolBar::DrawTool(
     wxBitmap                        vBitmap = pTool->GetNormalBitmap();
     bool                            bUseMask = FALSE;
     wxMask*                         pMask = NULL;
-    RECTL                           vRect;
 
     PrepareDC(rDc);
 
@@ -974,8 +970,6 @@ wxToolBarToolBase* wxToolBar::FindToolForPosition(
 , wxCoord                           vY
 ) const
 {
-    wxCoord                         vTextX = 0;
-    wxCoord                         vTextY = 0;
     wxCoord                         vTBarHeight = 0;
 
     GetSize( NULL
index c3bea8a366b4c2af6107cffdd027e347f61d522d..9fbc3e6ae35311cfb4cd7c8d9f22559fe3f12049 100644 (file)
@@ -76,8 +76,8 @@ END_EVENT_TABLE()
 // Dialog window proc
 MRESULT EXPENTRY wxDlgProc( HWND WXUNUSED(hWnd)
                            ,UINT uMessage
-                           ,MPARAM WXUNUSED(wParam)
-                           ,MPARAM WXUNUSED(lParam)
+                           ,void * WXUNUSED(wParam)
+                           ,void * WXUNUSED(lParam)
                           )
 {
     switch(uMessage)
@@ -167,7 +167,7 @@ void wxTopLevelWindowOS2::OnActivate(
         //
         // Restore focus to the child which was last focused
         //
-        wxLogTrace(_T("focus"), _T("wxTLW %08x activated."), m_hWnd);
+        wxLogTrace(_T("focus"), _T("wxTLW %08lx activated."), m_hWnd);
 
         wxWindow*                   pParent = m_pWinLastFocused ? m_pWinLastFocused->GetParent()
                                                                 : NULL;
@@ -206,7 +206,7 @@ void wxTopLevelWindowOS2::OnActivate(
         }
 
         wxLogTrace(_T("focus"),
-                   _T("wxTLW %08x deactivated, last focused: %08x."),
+                   _T("wxTLW %08lx deactivated, last focused: %08lx."),
                    m_hWnd,
                    m_pWinLastFocused ? GetHwndOf(m_pWinLastFocused)
                                      : NULL);
@@ -366,7 +366,7 @@ bool wxTopLevelWindowOS2::CreateDialog(
     {
         wxFAIL_MSG(wxT("Did you forget to include wx/os2/wx.rc in your resources?"));
 
-        wxLogSysError(wxT("Can't create dialog using template '%ul'"), ulDlgTemplate);
+        wxLogSysError(wxT("Can't create dialog using template '%ld'"), ulDlgTemplate);
 
         return FALSE;
     }
@@ -730,7 +730,6 @@ bool wxTopLevelWindowOS2::Show(
 {
     int                             nShowCmd;
     SWP                             vSwp;
-    RECTL                           vRect;
 
     if (bShow != IsShown() )
     {
@@ -820,7 +819,6 @@ void wxTopLevelWindowOS2::Maximize(
 
 bool wxTopLevelWindowOS2::IsMaximized() const
 {
-    bool                            bIconic;
 
     ::WinQueryWindowPos(m_hFrame, (PSWP)&m_vSwp);
     return (m_vSwp.fl & SWP_MAXIMIZE);
index df321ea4e3e61a1c0fdd58b890bf6c176c782477..622673e7f9ea062e6f818c680b824c1dfe75201a 100644 (file)
@@ -83,13 +83,13 @@ bool wxGetHostName(
 
     if ((zSysname = wxGetenv(_T("SYSTEM_NAME"))) == NULL)
     {
-        ULONG n = ::PrfQueryProfileString( HINI_PROFILE
-                                          ,(PSZ)WX_SECTION
-                                          ,(PSZ)eHOSTNAME
-                                          ,(PSZ)zDefaultHost
-                                          ,(void*)zBuf
-                                          ,(ULONG)nMaxSize - 1
-                                         );
+        ::PrfQueryProfileString( HINI_PROFILE
+                                ,(PSZ)WX_SECTION
+                                ,(PSZ)eHOSTNAME
+                                ,(PSZ)zDefaultHost
+                                ,(void*)zBuf
+                                ,(ULONG)nMaxSize - 1
+                               );
     }
     else
         wxStrncpy(zBuf, zSysname, nMaxSize - 1);
index e30a117b9a88e93503367721e741e9ea774d785e..f03454c49afd159f3cd979dbff6a2f48146e0b4c 100644 (file)
@@ -148,9 +148,7 @@ long wxExecute(
     ULONG                           ulExecFlag;
     PSZ                             zArgs = NULL;
     PSZ                             zEnvs = NULL;
-    ULONG                           ulWindowId;
     APIRET                          rc;
-    PFNWP                           pOldProc;
     TID                             vTID;
 
     if (flags & wxEXEC_SYNC)
index d5153224f1a735d3d8df478026b5804173476f38..fd710bbc2020136929e43efe0bef30c712d87459 100644 (file)
@@ -57,8 +57,6 @@ public:
     }
 };
 
-static wxTimer*                     wxTheSleepTimer = NULL;
-
 // Reading and writing resources (eg WIN.INI, .Xdefaults)
 #if wxUSE_RESOURCES
 bool wxWriteResource(
@@ -335,7 +333,6 @@ bool wxCheckForInterrupt(
         QMSG                        vMsg;
         HAB                         hab = 0;
         HWND                        hwndFilter = NULLHANDLE;
-        HWND                        hwndWin= (HWND) pWnd->GetHWND();
 
         while(::WinPeekMsg(hab, &vMsg, hwndFilter, 0, 0, PM_REMOVE))
         {
index df354d873394e9a80904ec08c894bad668f59ead..ea20d2de24c6b1326b18593e348d8cd37bd70c7a 100644 (file)
@@ -409,8 +409,6 @@ bool wxWindowOS2::Create(
 
     if (pParent)
     {
-        int                         nTempy;
-
         pParent->AddChild(this);
         hParent = GetWinHwnd(pParent);
 
@@ -749,7 +747,6 @@ void wxWindowOS2::SetScrollbar(
     ULONG                           ulStyle = WS_VISIBLE | WS_SYNCPAINT;
     SWP                             vSwp;
     SWP                             vSwpOwner;
-    RECTL                           vRect;
     HWND                            hWndParent;
     HWND                            hWndClient;
     wxWindow*                       pParent = GetParent();
@@ -941,9 +938,6 @@ void wxWindowOS2::ScrollWindow(
 )
 {
     RECTL                           vRect;
-    RECTL                           vRectHorz;
-    RECTL                           vRectVert;
-    RECTL                           vRectChild;
 
     if (pRect)
     {
@@ -1477,7 +1471,6 @@ void wxWindowOS2::DoMoveWindow(
 )
 {
     RECTL                           vRect;
-    HWND                            hParent;
     wxWindow*                       pParent = GetParent();
 
     if (pParent && !IsKindOf(CLASSINFO(wxDialog)))
@@ -1513,7 +1506,6 @@ void wxWindowOS2::DoMoveWindow(
         int                         nHeightFrameDelta = 0;
         int                         nHeightFrame = 0;
         int                         nWidthFrame = 0;
-        ULONG                       ulFLag = SWP_MOVE;
         wxFrame*                    pFrame;
 
         pFrame = wxDynamicCast(this, wxFrame);
@@ -1668,7 +1660,6 @@ void wxWindowOS2::DoSetSize(
     // Must convert Y coords to test for equality under OS/2
     //
     int                             nY2 = nY;
-    wxWindow*                       pParent = (wxWindow*)GetParent();
 
     if (nX == nCurrentX && nY2 == nCurrentY &&
         nWidth == nCurrentWidth && nHeight == nCurrentHeight)
@@ -1845,7 +1836,6 @@ void wxWindowOS2::GetTextExtent(
     FONTMETRICS                     vFM; // metrics structure
     BOOL                            bRc = FALSE;
     char*                           pStr;
-    ERRORID                         vErrorCode; // last error id code
     HPS                             hPS;
 
 
@@ -1951,28 +1941,6 @@ bool wxWindowOS2::IsMouseInWindow() const
 // popup menu
 // ---------------------------------------------------------------------------
 //
-#if wxUSE_MENUS_NATIVE
-static void wxYieldForCommandsOnly()
-{
-    //
-    // Peek all WM_COMMANDs (it will always return WM_QUIT too but we don't
-    // want to process it here)
-    //
-    QMSG                            vMsg;
-
-    while (::WinPeekMsg(vHabmain, &vMsg, (HWND)0, WM_COMMAND, WM_COMMAND, PM_REMOVE)
-           && vMsg.msg != WM_QUIT)
-    {
-        // luckily (as we don't have access to wxEventLoopImpl method from here
-        // anyhow...) we don't need to pre process WM_COMMANDs so dispatch it
-        // immediately
-        ::WinDispatchMsg(vHabmain, &vMsg);
-    }
-    if (vMsg.msg == WM_QUIT)
-        ::WinPostMsg(NULL, WM_QUIT, 0, 0);
-}
-#endif // wxUSE_MENUS_NATIVE
-
 #if wxUSE_MENUS_NATIVE
 bool wxWindowOS2::DoPopupMenu(
   wxMenu*                           pMenu
@@ -2005,7 +1973,6 @@ bool wxWindowOS2::DoPopupMenu(
     while(bIsWaiting)
     {
         QMSG                            vMsg;
-        BOOL                            bRc = ::WinGetMsg(vHabmain, &vMsg, HWND(NULL), 0, 0);
 
         if (vMsg.msg == WM_MENUEND || vMsg.msg == WM_COMMAND)
         {
@@ -2321,14 +2288,6 @@ MRESULT EXPENTRY wxWndProc(
 , MPARAM                            lParam
 )
 {
-    //
-    // Trace all ulMsgs - useful for the debugging
-    //
-#ifdef __WXDEBUG__
-    wxLogTrace(wxTraceMessages, wxT("Processing %s(wParam=%8lx, lParam=%8lx)"),
-               wxGetMessageName(ulMsg), wParam, lParam);
-#endif // __WXDEBUG__
-
     wxWindowOS2*                    pWnd = wxFindWinFromHandle((WXHWND)hWnd);
 
     //
@@ -3009,36 +2968,6 @@ MRESULT wxWindowOS2::OS2WindowProc(
     return mResult;
 } // end of wxWindowOS2::OS2WindowProc
 
-#ifndef __EMX__
-// clashes with wxDlgProc in toplevel.cpp?
-//
-// Dialog window proc
-//
-MRESULT wxDlgProc(
-  HWND                              WXUNUSED(hWnd)
-, UINT                              uMsg
-, MPARAM                            WXUNUSED(wParam)
-, MPARAM                            WXUNUSED(lParam))
-{
-    if (uMsg == WM_INITDLG)
-    {
-        //
-        // For this message, returning TRUE tells system to set focus to the
-        // first control in the dialog box
-        //
-        return (MRESULT)TRUE;
-    }
-    else
-    {
-        //
-        // For all the other ones, FALSE means that we didn't process the
-        // message
-        //
-        return (MRESULT)0;
-    }
-} // end of wxDlgProc
-#endif
-
 wxWindow* wxFindWinFromHandle(
   WXHWND                            hWnd
 )
@@ -3047,7 +2976,7 @@ wxWindow* wxFindWinFromHandle(
 
     if (!pNode)
         return NULL;
-    return (wxWindow *)pNode->Data();
+    return (wxWindow *)pNode->GetData();
 } // end of wxFindWinFromHandle
 
 void wxAssociateWinWithHandle(
@@ -3154,9 +3083,6 @@ bool wxWindowOS2::OS2Create(
     int                             nY      = 0L;
     int                             nWidth  = 0L;
     int                             nHeight = 0L;
-    wxWindow*                       pParent = GetParent();
-    HWND                            hWnd = NULLHANDLE;
-    HWND                            hParent;
     long                            lControlId = 0L;
     wxWindowCreationHook            vHook(this);
     wxString                        sClassName((wxChar*)zClass);
@@ -3696,14 +3622,14 @@ void wxWindowOS2::OnSysColourChanged(
   wxSysColourChangedEvent&          rEvent
 )
 {
-    wxNode*                         pNode = GetChildren().First();
+    wxWindowListNode*               pNode = GetChildren().GetFirst();
 
     while (pNode)
     {
         //
         // Only propagate to non-top-level windows
         //
-        wxWindow*                   pWin = (wxWindow *)pNode->Data();
+        wxWindow*                   pWin = (wxWindow *)pNode->GetData();
 
         if (pWin->GetParent())
         {
@@ -3712,7 +3638,7 @@ void wxWindowOS2::OnSysColourChanged(
             rEvent.m_eventObject = pWin;
             pWin->GetEventHandler()->ProcessEvent(vEvent);
         }
-        pNode = pNode->Next();
+        pNode = pNode->GetNext();
     }
 } // end of wxWindowOS2::OnSysColourChanged
 
@@ -3740,7 +3666,6 @@ bool wxWindowOS2::HandlePaint()
     HRGN                            hRgn;
     wxPaintEvent                    vEvent(m_windowId);
     HPS                             hPS;
-    RECTL                           vRect;
     bool                            bProcessed;
 
     // Create empty region
@@ -3772,8 +3697,6 @@ bool wxWindowOS2::HandlePaint()
         //
         HPS                         hPS;
         RECTL                       vRect;
-        wxFrame*                    pFrame;
-        wxWindow*                   pParent;
 
         hPS = ::WinBeginPaint( GetHwnd()
                               ,NULLHANDLE
@@ -3833,8 +3756,6 @@ bool wxWindowOS2::HandlePaint()
         //
         HPS                         hPS;
         RECTL                       vRect;
-        wxFrame*                    pFrame;
-        wxWindow*                   pParent;
 
         hPS = ::WinBeginPaint( GetHwnd()
                               ,NULLHANDLE
@@ -3954,7 +3875,6 @@ bool wxWindowOS2::HandleGetMinMaxInfo(
   PSWP                              pSwp
 )
 {
-    bool                            bRc = FALSE;
     POINTL                          vPoint;
 
     switch(pSwp->fl)
@@ -4104,7 +4024,6 @@ bool wxWindowOS2::HandleMouseEvent(
     bProcessed = GetEventHandler()->ProcessEvent(vEvent);
     if (!bProcessed)
     {
-        HPOINTER                    hPtr = ::WinQuerySysPointer(HWND_DESKTOP, SPTR_WAIT, FALSE);
         HPOINTER                    hCursor = (HPOINTER)GetCursor().GetHCURSOR();
 
         if (hCursor != NULLHANDLE)
@@ -4501,8 +4420,6 @@ int wxWindowOS2::GetOS2ParentHeight(
   wxWindowOS2*               pParent
 )
 {
-    wxWindowOS2*             pGrandParent = NULL;
-
     //
     // Case 1
     //
@@ -5298,7 +5215,6 @@ wxWindowOS2* FindWindowForMouseEvent(
     POINTL                          vPoint;
     BOOL                            rcEnabled = FALSE;
     BOOL                            rcVisible = FALSE;
-    HWND                            hWndDesktop = HWND_DESKTOP;
 
     ::WinQueryPointerPos(HWND_DESKTOP, &vPoint);
     hWndUnderMouse = ::WinWindowFromPoint(HWND_DESKTOP, &vPoint, TRUE);
@@ -5309,7 +5225,6 @@ wxWindowOS2* FindWindowForMouseEvent(
         if (pWinUnderMouse)
         {
             wxWindowList::Node*     pCurrent = pWinUnderMouse->GetChildren().GetFirst();
-            wxWindow*               pChild = NULL;
             wxWindow*               pGrandChild = NULL;
             RECTL                   vRect;
             POINTL                  vPoint2;