From 3ec60ca51bc231b6330c766121619f184aa44660 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 28 Nov 2011 16:02:50 +0100 Subject: [PATCH] QtCore/IO: Fix some warnings on Windows (64bit). - Warnings about conversion from size_t to int - Unused variable. Change-Id: I4a79fa6dc4b95551a64d282ae4307b0edff41201 Reviewed-by: Thiago Macieira --- src/corelib/io/qfilesystemengine_win.cpp | 2 -- src/corelib/io/qiodevice_p.h | 2 +- src/corelib/io/qprocess_win.cpp | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp index 71da2ec323..10ba95e97f 100644 --- a/src/corelib/io/qfilesystemengine_win.cpp +++ b/src/corelib/io/qfilesystemengine_win.cpp @@ -589,8 +589,6 @@ QString QFileSystemEngine::owner(const QFileSystemEntry &entry, QAbstractFileEng bool QFileSystemEngine::fillPermissions(const QFileSystemEntry &entry, QFileSystemMetaData &data, QFileSystemMetaData::MetaDataFlags what) { - QAbstractFileEngine::FileFlags ret = 0; - #if !defined(QT_NO_LIBRARY) if((qt_ntfs_permission_lookup > 0) && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)) { resolveLibs(); diff --git a/src/corelib/io/qiodevice_p.h b/src/corelib/io/qiodevice_p.h index 30e1869103..3ccad6254a 100644 --- a/src/corelib/io/qiodevice_p.h +++ b/src/corelib/io/qiodevice_p.h @@ -167,7 +167,7 @@ private: size_t newCapacity = qMax(capacity, size_t(QIODEVICE_BUFFERSIZE)); while (newCapacity < required) newCapacity *= 2; - int moveOffset = (where == freeSpaceAtEnd) ? 0 : newCapacity - len; + const size_t moveOffset = (where == freeSpaceAtEnd) ? 0 : newCapacity - size_t(len); if (newCapacity > capacity) { // allocate more space char* newBuf = new char[newCapacity]; diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp index 510f72312e..4601f23791 100644 --- a/src/corelib/io/qprocess_win.cpp +++ b/src/corelib/io/qprocess_win.cpp @@ -282,7 +282,7 @@ QProcessEnvironment QProcessEnvironment::systemEnvironment() // This is not the case the other way round. if (wchar_t *envStrings = GetEnvironmentStringsW()) { for (const wchar_t *entry = envStrings; *entry; ) { - int entryLen = wcslen(entry); + const int entryLen = int(wcslen(entry)); if (const wchar_t *equal = wcschr(entry, L'=')) { int nameLen = equal - entry; QString name = QString::fromWCharArray(entry, nameLen);