diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 0828a3dac3..f3c3b7896d 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -896,6 +896,10 @@ inline void qUnused(T &x) { (void)x; } class QString; Q_CORE_EXPORT QString qt_error_string(int errorCode = -1); + +#ifndef Q_CC_MSVC +Q_NORETURN +#endif Q_CORE_EXPORT void qt_assert(const char *assertion, const char *file, int line); #if !defined(Q_ASSERT) @@ -910,6 +914,9 @@ Q_CORE_EXPORT void qt_assert(const char *assertion, const char *file, int line); #define QT_NO_PAINT_DEBUG #endif +#ifndef Q_CC_MSVC +Q_NORETURN +#endif Q_CORE_EXPORT void qt_assert_x(const char *where, const char *what, const char *file, int line); #if !defined(Q_ASSERT_X) diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index f30df92a54..81fe82a973 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -201,6 +201,9 @@ void QMessageLogger::fatal(const char *msg, ...) va_list ap; va_start(ap, msg); // use variable arg list qt_message(QtFatalMsg, context, msg, ap); +#ifndef Q_CC_MSVC + Q_UNREACHABLE(); +#endif va_end(ap); } diff --git a/src/corelib/global/qlogging.h b/src/corelib/global/qlogging.h index 29313bd582..0860ef71b8 100644 --- a/src/corelib/global/qlogging.h +++ b/src/corelib/global/qlogging.h @@ -113,6 +113,10 @@ public: __attribute__ ((format (printf, 2, 3))) #endif ; + +#ifndef Q_CC_MSVC + Q_NORETURN +#endif void fatal(const char *msg, ...) #if defined(Q_CC_GNU) && !defined(__INSURE__) __attribute__ ((format (printf, 2, 3)))