From f9df3f0586be52d8a7dabfe51283de2795d73cf4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Mon, 22 Nov 2004 17:45:20 +0000 Subject: [PATCH] Warning fixes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30697 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/ftp.cpp | 4 ++-- src/common/wfstream.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/common/ftp.cpp b/src/common/ftp.cpp index 0a470ca93f..013495c741 100644 --- a/src/common/ftp.cpp +++ b/src/common/ftp.cpp @@ -348,7 +348,7 @@ char wxFTP::GetResult() } // if we got here we must have a non empty code string - return code[0u]; + return (char)code[0u]; } // ---------------------------------------------------------------------------- @@ -824,7 +824,7 @@ bool wxFTP::GetList(wxArrayString& files, // - Windows : like "dir" command // - others : ? wxString line(details ? _T("LIST") : _T("NLST")); - if ( !wildcard.IsEmpty() ) + if ( !wildcard.empty() ) { line << _T(' ') << wildcard; } diff --git a/src/common/wfstream.cpp b/src/common/wfstream.cpp index 59d89d127e..d89d5bfb64 100644 --- a/src/common/wfstream.cpp +++ b/src/common/wfstream.cpp @@ -253,7 +253,8 @@ wxFileOffset wxFFileInputStream::OnSysSeek(wxFileOffset pos, wxSeekMode mode) #ifdef __VMS #pragma message disable intsignchange #endif - return ( m_file->Seek(pos, mode) ? (wxFileOffset)m_file->Tell() : wxInvalidOffset ); + wxASSERT_MSG( pos >= 0 && pos <= LONG_MAX, _T("no huge wxFFile support") ); + return ( m_file->Seek((long)pos, mode) ? (wxFileOffset)m_file->Tell() : wxInvalidOffset ); #ifdef __VMS #pragma message enable intsignchange #endif @@ -333,7 +334,8 @@ wxFileOffset wxFFileOutputStream::OnSysSeek(wxFileOffset pos, wxSeekMode mode) #ifdef __VMS #pragma message disable intsignchange #endif - return ( m_file->Seek(pos, mode) ? (wxFileOffset)m_file->Tell() : wxInvalidOffset ); + wxASSERT_MSG( pos >= 0 && pos <= LONG_MAX, _T("no huge wxFFile support") ); + return ( m_file->Seek((long)pos, mode) ? (wxFileOffset)m_file->Tell() : wxInvalidOffset ); #ifdef __VMS #pragma message enable intsignchange #endif -- 2.47.2