Fix warnings when using MinGW:
main.cpp: In function 'int main(int, char**)':
main.cpp:734:55: warning: statement has no effect [-Wunused-value]
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
^
main.cpp:735:53: warning: statement has no effect [-Wunused-value]
_CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_DEBUG);
^
main.cpp:736:54: warning: statement has no effect [-Wunused-value]
_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG);
where _CrtSetReportMode() is an empty macro.
Change-Id: I644bc207b5a3df62d6390811f53b2c0948979d58
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
int main(int argc, char *argv[])
{
-#ifdef Q_OS_WIN
+#if defined(Q_OS_WIN) && !defined(Q_CC_MINGW)
// we do not want windows popping up if the module loaded triggers an assert
SetErrorMode(SEM_NOGPFAULTERRORBOX);
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
_CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_DEBUG);
_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG);
-#endif
+#endif // Q_OS_WIN && !Q_CC_MINGW
// The default message handler might not print to console on some systems. Enforce this.
qInstallMessageHandler(printDebugMessage);
#ifdef Q_OS_UNIX