summaryrefslogtreecommitdiffstats
path: root/qtools
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2019-03-10 10:33:35 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2019-03-10 10:33:35 (GMT)
commit8f614d75fe9b1fdcb91384a1296c76514a06d70b (patch)
treed8c5a7fbdc7e43bcc5106c3206cf852828dd8713 /qtools
parent208c689e4c13cc065045a6f6b1ff685eda5a3cd6 (diff)
downloadDoxygen-8f614d75fe9b1fdcb91384a1296c76514a06d70b.zip
Doxygen-8f614d75fe9b1fdcb91384a1296c76514a06d70b.tar.gz
Doxygen-8f614d75fe9b1fdcb91384a1296c76514a06d70b.tar.bz2
Fixed a few compiler warnings on win32
Diffstat (limited to 'qtools')
-rw-r--r--qtools/qcstring.cpp6
-rw-r--r--qtools/qfile_win32.cpp4
2 files changed, 5 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 );