From 702c6f81771c9667c3ef1b2c7ce77fb1c8e2982a Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 19 Sep 2014 13:13:37 +0200 Subject: qmlplugindump: Use _CrtSetReportMode() for MSVC only. 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: Ibd9024246f59e0c5d1a6a6a017cd680fd60b0113 Reviewed-by: Fawzi Mohamed --- tools/qmlplugindump/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp index c0e565a0..079ac1b7 100644 --- a/tools/qmlplugindump/main.cpp +++ b/tools/qmlplugindump/main.cpp @@ -529,13 +529,13 @@ void printUsage(const QString &appName) 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 #ifdef Q_OS_UNIX // qmldump may crash, but we don't want any crash handlers to pop up // therefore we intercept the segfault and just exit() ourselves -- cgit v1.2.3