summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2012-09-12 13:30:59 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-20 18:14:59 (GMT)
commit995676a9e7d3462e10cadfd57ef7f66b4dce75d5 (patch)
treeb63e94bd6ffa4c89e207992b76df75985a8744e4 /src
parent714becf4c68f720096e305cf1160f696550ecbb2 (diff)
downloadQt-995676a9e7d3462e10cadfd57ef7f66b4dce75d5.zip
Qt-995676a9e7d3462e10cadfd57ef7f66b4dce75d5.tar.gz
Qt-995676a9e7d3462e10cadfd57ef7f66b4dce75d5.tar.bz2
Threads: Fix mingw-gcc warning about 'cast to pointer from integer of different size'
Use reinterpret_cast to convert from DWORD to pointer. Change-Id: I17a12940850aeb0bc27080725a18eb93fee72ff7 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> (cherry picked from qtbase/edfdaba696d94206794203f9621d7e3aa8e5ab26) Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/thread/qthread_win.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index 98a7f81..ad32d5b 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -130,7 +130,7 @@ QThreadData *QThreadData::current()
threadData->deref();
}
threadData->isAdopted = true;
- threadData->threadId = (Qt::HANDLE)GetCurrentThreadId();
+ threadData->threadId = reinterpret_cast<Qt::HANDLE>(GetCurrentThreadId());
if (!QCoreApplicationPrivate::theMainThread) {
QCoreApplicationPrivate::theMainThread = threadData->thread;
@@ -145,7 +145,7 @@ QThreadData *QThreadData::current()
FALSE,
DUPLICATE_SAME_ACCESS);
#else
- realHandle = (HANDLE)GetCurrentThreadId();
+ realHandle = reinterpret_cast<HANDLE>(GetCurrentThreadId());
#endif
qt_watch_adopted_thread(realHandle, threadData->thread);
}
@@ -327,7 +327,7 @@ unsigned int __stdcall QT_ENSURE_STACK_ALIGNED_FOR_SSE QThreadPrivate::start(voi
qt_create_tls();
TlsSetValue(qt_current_thread_data_tls_index, data);
- data->threadId = (Qt::HANDLE)GetCurrentThreadId();
+ data->threadId = reinterpret_cast<Qt::HANDLE>(GetCurrentThreadId());
QThread::setTerminationEnabled(false);
@@ -402,7 +402,7 @@ void QThreadPrivate::finish(void *arg, bool lockAnyway)
Qt::HANDLE QThread::currentThreadId()
{
- return (Qt::HANDLE)GetCurrentThreadId();
+ return reinterpret_cast<Qt::HANDLE>(GetCurrentThreadId());
}
int QThread::idealThreadCount()