diff --git a/src/xmlpatterns/parser/qquerytransformparser.cpp b/src/xmlpatterns/parser/qquerytransformparser.cpp
index 3b0147963dda5d1b66ea1a5463c027d428e3e44f..b2544e830d0eec205ee196c138f6e2d096ff4da1 100644
--- a/src/xmlpatterns/parser/qquerytransformparser.cpp
+++ b/src/xmlpatterns/parser/qquerytransformparser.cpp
@@ -3480,6 +3480,7 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp, parseInfo)
     ParserContext *const parseInfo;
 #endif
 {
+  YYUSE (yytype);
   YYUSE (yyvaluep);
   YYUSE (yylocationp);
   YYUSE (parseInfo);
@@ -3487,13 +3488,6 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp, parseInfo)
   if (!yymsg)
     yymsg = "Deleting";
   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
-
-  switch (yytype)
-    {
-
-      default:
-	break;
-    }
 }