TestLib: Fix MinGW compile warning

MinGW-64 defines _CrtSetReportMode, but only as a noop, resulting
in a warning "statement has no effect [-Wunused-value]"

Change-Id: I6e509246134dd5929b23b07abdb6d705db603793
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
Kai Koehne 2012-09-27 10:08:35 +02:00 committed by The Qt Project
parent 46608f98c6
commit e47faabe23

View File

@ -2085,7 +2085,7 @@ int QTest::qExec(QObject *testObject, int argc, char **argv)
#endif #endif
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
# if !defined(Q_CC_MINGW) || (defined(Q_CC_MINGW) && defined(__MINGW64_VERSION_MAJOR)) # if !defined(Q_CC_MINGW)
_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG); _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG);
# endif # endif
SetErrorMode(SetErrorMode(0) | SEM_NOGPFAULTERRORBOX); SetErrorMode(SetErrorMode(0) | SEM_NOGPFAULTERRORBOX);