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>
bb10
Friedemann Kleint 2013-12-16 17:23:00 +01:00 committed by The Qt Project
parent be29c4053e
commit d1f8a56416
1 changed files with 5 additions and 1 deletions

View File

@ -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;