diff --git a/tests/auto/debugger/tst_gdb.cpp b/tests/auto/debugger/tst_gdb.cpp
index dfa14e1285ed0082d8d67b23632807a99463d3cc..5c15165121de064ed18f752bd250ee80d264728d 100644
--- a/tests/auto/debugger/tst_gdb.cpp
+++ b/tests/auto/debugger/tst_gdb.cpp
@@ -3616,7 +3616,6 @@ void breaker() {}
 
 int main(int argc, char *argv[])
 {
-    char *x = argv[0];
     #ifdef QT_GUI_LIB
     QApplication app(argc, argv);
     #else