diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-12-16 17:23:00 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-17 16:44:03 +0100 |
commit | d1f8a5641615eb83bb36b4ada5913531d0da24f1 (patch) | |
tree | c7bb45bfa193a445751091c0e579869919bfa1e9 /src/corelib/thread/qthread_win.cpp | |
parent | be29c4053e00f80964a1a997111d89e7a96adb7d (diff) |
qthread_win.cpp: Fix warnings when waiting for adopted threads.
Task-number: QTBUG-35591
Change-Id: I63169bd8a9758a7dad33d4231d3d6c9d71c7e252
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/thread/qthread_win.cpp')
-rw-r--r-- | src/corelib/thread/qthread_win.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp index 9d90583a28..037343c996 100644 --- a/src/corelib/thread/qthread_win.cpp +++ b/src/corelib/thread/qthread_win.cpp @@ -208,7 +208,11 @@ DWORD WINAPI qt_adopted_thread_watcher_function(LPVOID) qt_adopted_thread_watcher_mutex.unlock(); DWORD ret = WAIT_TIMEOUT; - int loops = (handlesCopy.count() / MAXIMUM_WAIT_OBJECTS) + 1, offset, count; + int count; + int offset; + int loops = handlesCopy.size() / MAXIMUM_WAIT_OBJECTS; + if (handlesCopy.size() % MAXIMUM_WAIT_OBJECTS) + ++loops; if (loops == 1) { // no need to loop, no timeout offset = 0; |