diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2012-09-30 13:51:29 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2012-09-30 13:51:29 (GMT) |
commit | ceb4115c7b941039411e1793e01239610ff112a2 (patch) | |
tree | d18c06222e0f84d6077b586e5633053a8bc09da8 /qtools/qfile_unix.cpp | |
parent | f6d511e52eb55c5d5b980c4d226f2ea80b396095 (diff) | |
download | Doxygen-ceb4115c7b941039411e1793e01239610ff112a2.zip Doxygen-ceb4115c7b941039411e1793e01239610ff112a2.tar.gz Doxygen-ceb4115c7b941039411e1793e01239610ff112a2.tar.bz2 |
Release-1.8.2-20120930
Diffstat (limited to 'qtools/qfile_unix.cpp')
-rw-r--r-- | qtools/qfile_unix.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/qtools/qfile_unix.cpp b/qtools/qfile_unix.cpp index fa53d13..0422fb4 100644 --- a/qtools/qfile_unix.cpp +++ b/qtools/qfile_unix.cpp @@ -403,7 +403,7 @@ uint QFile::size() const } else { STAT( QFile::encodeName(fn), &st ); } - return st.st_size; + return (uint)st.st_size; } /*! @@ -500,13 +500,13 @@ int QFile::readBlock( char *p, uint len ) if ( nread < (int)len ) { if ( isRaw() ) { // raw file - nread += READ( fd, p, len-nread ); + nread += (int)READ( fd, p, len-nread ); if ( len && nread <= 0 ) { nread = 0; setStatus(IO_ReadError); } } else { // buffered file - nread += fread( p, 1, len-nread, fh ); + nread += (int)fread( p, 1, len-nread, fh ); if ( (uint)nread != len ) { if ( ferror( fh ) || nread==0 ) setStatus(IO_ReadError); @@ -552,9 +552,9 @@ int QFile::writeBlock( const char *p, uint len ) #endif int nwritten; // number of bytes written if ( isRaw() ) // raw file - nwritten = WRITE( fd, p, len ); + nwritten = (int)WRITE( fd, p, len ); else // buffered file - nwritten = fwrite( p, 1, len, fh ); + nwritten = (int)fwrite( p, 1, len, fh ); if ( nwritten != (int)len ) { // write error if ( errno == ENOSPC ) // disk is full setStatus( IO_ResourceError ); @@ -661,7 +661,7 @@ bool QFile::seek( int64 pos ) if (isOpen()) { // TODO: support 64 bit size - return fseek( fh, pos, SEEK_SET )!=-1; + return fseek( fh, (long)pos, SEEK_SET )!=-1; } return FALSE; } |