]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed Printf() format spec warnings
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 8 Sep 2002 18:11:02 +0000 (18:11 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 8 Sep 2002 18:11:02 +0000 (18:11 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/widgets/combobox.cpp
samples/widgets/listbox.cpp
samples/widgets/radiobox.cpp

index 955567971eb5481f3db014c55d69a87d73f8f0e8..f37c4721a5316059fc2bc515d3ee3bd3489b7fdc 100644 (file)
@@ -411,7 +411,7 @@ void ComboboxWidgetsPage::OnButtonClear(wxCommandEvent& event)
 
 void ComboboxWidgetsPage::OnButtonAdd(wxCommandEvent& event)
 {
-    static size_t s_item = 0;
+    static unsigned int s_item = 0;
 
     wxString s = m_textAdd->GetValue();
     if ( !m_textAdd->IsModified() )
@@ -426,7 +426,7 @@ void ComboboxWidgetsPage::OnButtonAdd(wxCommandEvent& event)
 void ComboboxWidgetsPage::OnButtonAddMany(wxCommandEvent& WXUNUSED(event))
 {
     // "many" means 1000 here
-    for ( size_t n = 0; n < 1000; n++ )
+    for ( unsigned int n = 0; n < 1000; n++ )
     {
         m_combobox->Append(wxString::Format(_T("item #%u"), n));
     }
index ca2773d8050d31f74fe5bb3ead924d4e2858ea5e..fa0f8be64451f612df17367a89afcd03cd100156 100644 (file)
@@ -428,7 +428,7 @@ void ListboxWidgetsPage::OnButtonClear(wxCommandEvent& event)
 
 void ListboxWidgetsPage::OnButtonAdd(wxCommandEvent& event)
 {
-    static size_t s_item = 0;
+    static unsigned int s_item = 0;
 
     wxString s = m_textAdd->GetValue();
     if ( !m_textAdd->IsModified() )
@@ -443,7 +443,7 @@ void ListboxWidgetsPage::OnButtonAdd(wxCommandEvent& event)
 void ListboxWidgetsPage::OnButtonAddMany(wxCommandEvent& WXUNUSED(event))
 {
     // "many" means 1000 here
-    for ( size_t n = 0; n < 1000; n++ )
+    for ( unsigned int n = 0; n < 1000; n++ )
     {
         m_lbox->Append(wxString::Format(_T("item #%u"), n));
     }
index e474cbc17268977e3942a9fecb400dd1e5da5d1f..90cb6bb5fa0cb6a813c378cebe9e2295ea88e5ab 100644 (file)
@@ -65,8 +65,8 @@ enum
 };
 
 // default values for the number of radiobox items
-static const size_t DEFAULT_NUM_ENTRIES = 12;
-static const size_t DEFAULT_MAJOR_DIM = 3;
+static const unsigned int DEFAULT_NUM_ENTRIES = 12;
+static const unsigned int DEFAULT_MAJOR_DIM = 3;
 
 // ----------------------------------------------------------------------------
 // RadioWidgetsPage
@@ -272,8 +272,8 @@ RadioWidgetsPage::~RadioWidgetsPage()
 
 void RadioWidgetsPage::Reset()
 {
-    m_textMajorDim->SetValue(wxString::Format(_T("%d"), DEFAULT_MAJOR_DIM));
-    m_textNumBtns->SetValue(wxString::Format(_T("%d"), DEFAULT_NUM_ENTRIES));
+    m_textMajorDim->SetValue(wxString::Format(_T("%u"), DEFAULT_MAJOR_DIM));
+    m_textNumBtns->SetValue(wxString::Format(_T("%u"), DEFAULT_NUM_ENTRIES));
     m_textLabel->SetValue(_T("I'm a radiobox"));
     m_textLabelBtns->SetValue(_T("item"));
 
@@ -320,7 +320,8 @@ void RadioWidgetsPage::CreateRadio()
     wxString labelBtn = m_textLabelBtns->GetValue();
     for ( size_t n = 0; n < count; n++ )
     {
-        items[n] = wxString::Format(_T("%s %u"), labelBtn.c_str(), n + 1);
+        items[n] = wxString::Format(_T("%s %lu"),
+                                    labelBtn.c_str(), (unsigned long)n + 1);
     }
 
     int flags = m_chkVert->GetValue() ? wxRA_VERTICAL