]> git.saurik.com Git - wxWidgets.git/commitdiff
GCC fixes.
authorWłodzimierz Skiba <abx@abx.art.pl>
Mon, 22 Nov 2004 19:32:37 +0000 (19:32 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Mon, 22 Nov 2004 19:32:37 +0000 (19:32 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30700 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/db/dbtest.cpp
samples/db/listdb.cpp

index ef03c414985ec49902f98cf0a554de5915d2390b..c999c7019cbd286c3c22d321ce6b3be5792f8df5 100644 (file)
@@ -1707,7 +1707,8 @@ void CeditorDlg::OnSelectPict()
 
         if (file.IsOpened())
         {
-            wxFileOffset iSize = file.Length();
+            // assume not huge file in sample
+            long iSize = (long)file.Length();
 
             if ((iSize > 0) && (iSize < MAX_PICTURE_SIZE))
             {
@@ -1721,7 +1722,7 @@ void CeditorDlg::OnSelectPict()
                     wxMessageBox(wxT("Something bad happened while reading..."), wxT("BLOB Loading Error"), wxOK | wxICON_EXCLAMATION);
 
                 wxString tStr;
-                tStr.Printf(wxT("%lu"),iSize);
+                tStr.Printf(wxT("%ld"),iSize);
                 pPictSizeTxt->SetValue(tStr);
             }
             else
index 5714c9125c5d5176bea9b4e656f1f8597b4d58d1..ff932873336c8711239982b46c3ed3141552cd0f 100644 (file)
@@ -202,7 +202,7 @@ ClookUpDlg::ClookUpDlg(wxWindow *parent, const wxString &windowTitle, const wxSt
     if (!lookup->Open())
     {
         wxString tStr;
-        tStr.Printf(wxT("Unable to open the table '%s'."), tableName);
+        tStr.Printf(wxT("Unable to open the table '%s'."), tableName.c_str());
         wxMessageBox(tStr, wxT("ODBC Error..."));
         Close();
         return;
@@ -267,7 +267,7 @@ ClookUpDlg::ClookUpDlg(wxWindow *parent, const wxString &windowTitle, const wxSt
 // in the lookup window.
 //
 ClookUpDlg::ClookUpDlg(wxWindow *parent, const wxString &windowTitle, const wxString &tableName,
-                       const wxString &dispCol1, const wxString &dispCol2, 
+                       const wxString &dispCol1, const wxString &dispCol2,
                        const wxString &where, const wxString &orderBy,
                        wxDb *pDb, const wxString &defDir, bool distinctValues,
                        const wxString &selectStmt, int maxLenCol1, bool allowOk)
@@ -309,7 +309,7 @@ ClookUpDlg::ClookUpDlg(wxWindow *parent, const wxString &windowTitle, const wxSt
     if (!lookup2->Open())
     {
         wxString tStr;
-        tStr.Printf(wxT("Unable to open the table '%s'."),tableName);
+        tStr.Printf(wxT("Unable to open the table '%s'."),tableName.c_str());
         tStr += GetExtendedDBErrorMsg2(pDb,__TFILE__,__LINE__);
         wxMessageBox(tStr,wxT("ODBC Error..."));
         Close();