]> git.saurik.com Git - wxWidgets.git/commitdiff
Warning fix.
authorWłodzimierz Skiba <abx@abx.art.pl>
Thu, 23 Mar 2006 10:11:05 +0000 (10:11 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Thu, 23 Mar 2006 10:11:05 +0000 (10:11 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/vscroll.cpp
src/msw/mediactrl_am.cpp
src/msw/ole/activex.cpp

index 1f2c1c16b127ae450a657536107f64e0657a9ed6..d3eb9a3e5f491d45167efd0a4640de03637d61b3 100644 (file)
@@ -772,16 +772,20 @@ void wxHVScrolledWindow::SetRowColumnCounts(size_t rowCount, size_t columnCount)
 
     // recalculate the scrollbars parameters
     if(m_rowsFirst >= rowCount)
-        m_rowsFirst = rowCount-1;
+        m_rowsFirst = (rowCount > 0) ? rowCount - 1 : 0;
 
     if(m_columnsFirst >= columnCount)
-        m_columnsFirst = columnCount-1;
+        m_columnsFirst = (columnCount > 0) ? columnCount - 1 : 0;
 
+#if 0
+    // checks disabled due to size_t type of members
+    // but leave them here if anyone would want to do some debugging
     if(m_rowsFirst < 0)
         m_rowsFirst = 0;
 
     if(m_columnsFirst < 0)
         m_columnsFirst = 0;
+#endif
 
     ScrollToRowColumn(m_rowsFirst, m_columnsFirst);
 }
index b1529a5483d80c2023c7328a29a880c7afe18b4b..52644f1bc856653fb890f129d96d958832c4774e 100644 (file)
@@ -2266,4 +2266,4 @@ FORCE_LINK_ME(wxmediabackend_am)
 //---------------------------------------------------------------------------
 //  End wxMediaCtrl Compilation Guard and this file
 //---------------------------------------------------------------------------
-#endif // wxUSE_MEDIACTRL
\ No newline at end of file
+#endif // wxUSE_MEDIACTRL
index 4b5a415e64389781ff6f7e4162037c69869c0da1..0c8ec070f418e07da520cc63c1d20cff4cafa5bb 100644 (file)
@@ -946,7 +946,7 @@ void wxActiveXContainer::CreateActiveX(REFIID iid, IUnknown* pUnk)
                 hret = cp->Advise(new wxActiveXEvents(this, ta->guid),
                                   &adviseCookie);
                 wxASSERT_MSG( SUCCEEDED(hret),
-                    wxString::Format(wxT("Cannot connect!\nHRESULT:%X"), hret)
+                    wxString::Format(wxT("Cannot connect!\nHRESULT:%X"), (unsigned int)hret)
                             );
             }
         }