diff options
Diffstat (limited to 'qtools')
-rw-r--r-- | qtools/qcstring.cpp | 6 | ||||
-rw-r--r-- | qtools/qfile_win32.cpp | 4 | ||||
-rw-r--r-- | qtools/qglobal.h | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/qtools/qcstring.cpp b/qtools/qcstring.cpp index 77461b2..6a14d66 100644 --- a/qtools/qcstring.cpp +++ b/qtools/qcstring.cpp @@ -343,7 +343,7 @@ QCString QCString::simplifyWhiteSpace() const if ( to > first && *(to-1) == 0x20 ) to--; *to = '\0'; - result.resize( (int)((long)to - (long)result.data()) + 1 ); + result.resize( (int)(to - result.data()) + 1 ); return result; } @@ -571,7 +571,7 @@ int qstricmp( const char *str1, const char *str2 ) int res; uchar c; if ( !s1 || !s2 ) - return s1 == s2 ? 0 : (int)((long)s2 - (long)s1); + return s1 == s2 ? 0 : (int)(s2 - s1); for ( ; !(res = (c=tolower(*s1)) - tolower(*s2)); s1++, s2++ ) if ( !c ) // strings are equal break; @@ -585,7 +585,7 @@ int qstrnicmp( const char *str1, const char *str2, uint len ) int res; uchar c; if ( !s1 || !s2 ) - return (int)((long)s2 - (long)s1); + return (int)(s2 - s1); for ( ; len--; s1++, s2++ ) { if ( (res = (c=tolower(*s1)) - tolower(*s2)) ) return res; diff --git a/qtools/qfile_win32.cpp b/qtools/qfile_win32.cpp index a4ab013..e0b1d88 100644 --- a/qtools/qfile_win32.cpp +++ b/qtools/qfile_win32.cpp @@ -515,7 +515,7 @@ int QFile::readBlock( char *p, uint len ) setStatus(IO_ReadError); } } else { // buffered file - nread = fread( p, 1, len, fh ); + nread = (int)fread( p, 1, len, fh ); if ( (uint)nread != len ) { if ( ferror( fh ) || nread==0 ) setStatus(IO_ReadError); @@ -562,7 +562,7 @@ int QFile::writeBlock( const char *p, uint len ) if ( isRaw() ) // raw file nwritten = 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 ); diff --git a/qtools/qglobal.h b/qtools/qglobal.h index c3f7594..8512f41 100644 --- a/qtools/qglobal.h +++ b/qtools/qglobal.h @@ -357,7 +357,9 @@ typedef const char *pcchar; typedef __int64 int64; typedef unsigned __int64 uint64; #else +#if !defined(_OS_AIX_) || !defined(_H_INTTYPES) typedef long long int64; +#endif typedef unsigned long long uint64; #endif |