summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2012-09-28 14:16:36 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-09-29 06:12:32 (GMT)
commitd65dbb5d508d4cdbc383686428430035c205b21c (patch)
tree35457ae8b8cb93fdae295ac28c78d221091b98d9 /src/corelib
parent66e7e69f00a08664f0c0a6ed62a37a6918eaf8f3 (diff)
downloadQt-d65dbb5d508d4cdbc383686428430035c205b21c.zip
Qt-d65dbb5d508d4cdbc383686428430035c205b21c.tar.gz
Qt-d65dbb5d508d4cdbc383686428430035c205b21c.tar.bz2
Fix g++/MinGW compiler warnings.
- Assigned/Unused variables. - Unsigned comparison >= 0 is always true. - Constructor initialization order. - Signed/Unsigned comparisons. Change-Id: I1f9edab0506573420ed0bf3055252ba48625c8eb Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/qfilesystemengine_win.cpp2
-rw-r--r--src/corelib/kernel/qeventdispatcher_win.cpp6
-rw-r--r--src/corelib/thread/qthread_win.cpp2
3 files changed, 4 insertions, 6 deletions
diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp
index 4cc09b3..6ea705c 100644
--- a/src/corelib/io/qfilesystemengine_win.cpp
+++ b/src/corelib/io/qfilesystemengine_win.cpp
@@ -625,8 +625,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/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp
index bcd58b2..4d74316 100644
--- a/src/corelib/kernel/qeventdispatcher_win.cpp
+++ b/src/corelib/kernel/qeventdispatcher_win.cpp
@@ -661,7 +661,7 @@ void QEventDispatcherWin32Private::doWsaAsyncSelect(int socket)
sn_event |= FD_OOB;
// BoundsChecker may emit a warning for WSAAsyncSelect when sn_event == 0
// This is a BoundsChecker bug and not a Qt bug
- WSAAsyncSelect(socket, internalHwnd, sn_event ? WM_QT_SOCKETNOTIFIER : 0, sn_event);
+ WSAAsyncSelect(socket, internalHwnd, sn_event ? unsigned(WM_QT_SOCKETNOTIFIER) : unsigned(0), sn_event);
}
void QEventDispatcherWin32::createInternalHwnd()
@@ -808,7 +808,7 @@ bool QEventDispatcherWin32::processEvents(QEventLoop::ProcessEventsFlags flags)
TranslateMessage(&msg);
DispatchMessage(&msg);
}
- } else if (waitRet >= WAIT_OBJECT_0 && waitRet < WAIT_OBJECT_0 + nCount) {
+ } else if (waitRet < WAIT_OBJECT_0 + nCount) {
d->activateEventNotifier(d->winEventNotifierList.at(waitRet - WAIT_OBJECT_0));
} else {
// nothing todo so break
@@ -830,7 +830,7 @@ bool QEventDispatcherWin32::processEvents(QEventLoop::ProcessEventsFlags flags)
emit aboutToBlock();
waitRet = MsgWaitForMultipleObjectsEx(nCount, pHandles, INFINITE, QS_ALLINPUT, MWMO_ALERTABLE | MWMO_INPUTAVAILABLE);
emit awake();
- if (waitRet >= WAIT_OBJECT_0 && waitRet < WAIT_OBJECT_0 + nCount) {
+ if (waitRet < WAIT_OBJECT_0 + nCount) {
d->activateEventNotifier(d->winEventNotifierList.at(waitRet - WAIT_OBJECT_0));
retVal = true;
}
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index 91136b8..9c9e9b8 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -228,7 +228,7 @@ DWORD WINAPI qt_adopted_thread_watcher_function(LPVOID)
} while (ret == WAIT_TIMEOUT);
}
- if (ret == WAIT_FAILED || !(ret >= WAIT_OBJECT_0 && ret < WAIT_OBJECT_0 + uint(count))) {
+ if (ret == WAIT_FAILED || ret >= WAIT_OBJECT_0 + uint(count)) {
qWarning("QThread internal error while waiting for adopted threads: %d", int(GetLastError()));
continue;
}