diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2016-11-29 13:07:01 +0100 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@qt.io> | 2016-11-29 15:13:26 +0000 |
commit | 81401ace260cdf7e0f27e22efa74d90afecd7c75 (patch) | |
tree | 0bcf9cb252db25f2c84e60a187cafe8ade4f2e0e /src/plugins/cppeditor/cppquickfixes.cpp | |
parent | 38f089c580bfa211cea39493fae1d4ad0745f842 (diff) |
CppEditor: Fix possible use of uninitialized values
Change-Id: I138309e5e85c839250f5f93448530b9e12c5f6af
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'src/plugins/cppeditor/cppquickfixes.cpp')
-rw-r--r-- | src/plugins/cppeditor/cppquickfixes.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/cppeditor/cppquickfixes.cpp b/src/plugins/cppeditor/cppquickfixes.cpp index 39aeb5897a5..43e402f0460 100644 --- a/src/plugins/cppeditor/cppquickfixes.cpp +++ b/src/plugins/cppeditor/cppquickfixes.cpp @@ -3850,7 +3850,7 @@ public: result.file = refactoring.file(declFileName); ASTPath astPath(result.file->cppDocument()); const QList<AST *> path = astPath(s->line(), s->column()); - SimpleDeclarationAST *simpleDecl; + SimpleDeclarationAST *simpleDecl = nullptr; for (int idx = 0; idx < path.size(); ++idx) { AST *node = path.at(idx); simpleDecl = node->asSimpleDeclaration(); |