From f0fb3b3b60ca8c9669107adca2ca2ef28e6455c1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Mon, 22 Nov 2004 19:32:37 +0000 Subject: [PATCH] GCC fixes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30700 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/db/dbtest.cpp | 5 +++-- samples/db/listdb.cpp | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/samples/db/dbtest.cpp b/samples/db/dbtest.cpp index ef03c41498..c999c7019c 100644 --- a/samples/db/dbtest.cpp +++ b/samples/db/dbtest.cpp @@ -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 diff --git a/samples/db/listdb.cpp b/samples/db/listdb.cpp index 5714c9125c..ff93287333 100644 --- a/samples/db/listdb.cpp +++ b/samples/db/listdb.cpp @@ -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(); -- 2.50.0