From 59ad204c3daac2b642f39ca49a88cb7cbb25e6d0 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint <Friedemann.Kleint@digia.com> Date: Thu, 7 Mar 2013 11:21:43 +0100 Subject: [PATCH] Fix CLANG-warnings. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Unused member variable. - Unused static functions. - Return false for pointer. Change-Id: Ie78332d3754e7f53ed75d6006c11d60c29719c7b Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> --- src/scripttools/debugging/qscriptdebugger.cpp | 3 +-- src/scripttools/debugging/qscriptdebuggerconsole.cpp | 2 +- tests/auto/qscriptengine/tst_qscriptengine.cpp | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/scripttools/debugging/qscriptdebugger.cpp b/src/scripttools/debugging/qscriptdebugger.cpp index 47a428e4..24de6b78 100644 --- a/src/scripttools/debugging/qscriptdebugger.cpp +++ b/src/scripttools/debugging/qscriptdebugger.cpp @@ -1021,7 +1021,7 @@ class SyncBreakpointsJob : public QScriptDebuggerCommandSchedulerJob public: SyncBreakpointsJob(QScriptDebuggerPrivate *debugger) : QScriptDebuggerCommandSchedulerJob(debugger), - m_debugger(debugger), m_index(-1) {} + m_debugger(debugger) {} void start() { QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); @@ -1044,7 +1044,6 @@ public: private: QScriptDebuggerPrivate *m_debugger; - int m_index; QList<QScriptContextInfo> m_infos; }; diff --git a/src/scripttools/debugging/qscriptdebuggerconsole.cpp b/src/scripttools/debugging/qscriptdebuggerconsole.cpp index 6baa0c9a..c59b0617 100644 --- a/src/scripttools/debugging/qscriptdebuggerconsole.cpp +++ b/src/scripttools/debugging/qscriptdebuggerconsole.cpp @@ -489,7 +489,7 @@ QScriptDebuggerConsoleCommandJob *QScriptDebuggerConsole::consumeInput( d->input += QLatin1Char('\n'); QScriptSyntaxCheckResult check = QScriptEngine::checkSyntax(d->input); if (check.state() == QScriptSyntaxCheckResult::Intermediate) - return false; + return 0; d->input.chop(1); // remove the last \n cmd = QString(); cmd.append(d->commandPrefix); diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp index 1747b2e6..c75f6522 100644 --- a/tests/auto/qscriptengine/tst_qscriptengine.cpp +++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp @@ -2653,6 +2653,7 @@ void tst_QScriptEngine::importExtension() QCoreApplication::instance()->setLibraryPaths(libPaths); } +#if 0 //The native C++ stack overflow before the JS stack static QScriptValue recurse(QScriptContext *ctx, QScriptEngine *eng) { Q_UNUSED(eng); @@ -2664,6 +2665,7 @@ static QScriptValue recurse2(QScriptContext *ctx, QScriptEngine *eng) Q_UNUSED(eng); return ctx->callee().construct(); } +#endif void tst_QScriptEngine::infiniteRecursion() { -- GitLab