Warning fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1707,17 +1707,15 @@ void CeditorDlg::OnSelectPict()
|
|||||||
|
|
||||||
if (file.IsOpened())
|
if (file.IsOpened())
|
||||||
{
|
{
|
||||||
off_t iSize = file.Length();
|
wxFileOffset iSize = file.Length();
|
||||||
|
|
||||||
if ((iSize > 0) && (iSize < MAX_PICTURE_SIZE))
|
if ((iSize > 0) && (iSize < MAX_PICTURE_SIZE))
|
||||||
{
|
{
|
||||||
off_t iReadSize = 0;
|
wxGetApp().Contact->BlobSize = (size_t)iSize;
|
||||||
|
|
||||||
wxGetApp().Contact->BlobSize = iSize;
|
|
||||||
|
|
||||||
memset(wxGetApp().Contact->Picture, 0, MAX_PICTURE_SIZE);
|
memset(wxGetApp().Contact->Picture, 0, MAX_PICTURE_SIZE);
|
||||||
|
|
||||||
iReadSize = file.Read(wxGetApp().Contact->Picture, iSize);
|
wxFileOffset iReadSize = file.Read(wxGetApp().Contact->Picture, (size_t)iSize);
|
||||||
|
|
||||||
if (iReadSize < iSize)
|
if (iReadSize < iSize)
|
||||||
wxMessageBox(wxT("Something bad happened while reading..."), wxT("BLOB Loading Error"), wxOK | wxICON_EXCLAMATION);
|
wxMessageBox(wxT("Something bad happened while reading..."), wxT("BLOB Loading Error"), wxOK | wxICON_EXCLAMATION);
|
||||||
|
Reference in New Issue
Block a user