diff --git a/src/xmlpatterns/api/qcoloringmessagehandler.cpp b/src/xmlpatterns/api/qcoloringmessagehandler.cpp
index 942d9df0dd20b8851bdb59acfd006ade72fc387d..2e2f07bb1493fee2c5c321b22f44d86ed530e8d2 100644
--- a/src/xmlpatterns/api/qcoloringmessagehandler.cpp
+++ b/src/xmlpatterns/api/qcoloringmessagehandler.cpp
@@ -130,6 +130,7 @@ void ColoringMessageHandler::handleMessage(QtMsgType type,
         case QtCriticalMsg:
         /* Fallthrough. */
         case QtDebugMsg:
+        default:
         {
             Q_ASSERT_X(false, Q_FUNC_INFO,
                        "message() is not supposed to receive QtCriticalMsg or QtDebugMsg.");