Fixed compiler warnings which aren't actually problems · scummos/kdevelop-python@a84ff96 · GitHub
Skip to content

Commit a84ff96

Browse files
committed
Fixed compiler warnings which aren't actually problems
1 parent 3645aa1 commit a84ff96

9 files changed

Lines changed: 24 additions & 18 deletions

‎codecompletion/pythoncodecompletioncontext.cpp‎

Lines changed: 1 addition & 1 deletion

‎codecompletion/pythoncodecompletionworker.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ PythonCodeCompletionWorker::PythonCodeCompletionWorker(PythonCodeCompletionModel
1717

1818
}
1919

20-
KDevelop::CodeCompletionContext* PythonCodeCompletionWorker::createCompletionContext(KDevelop::DUContextPointer context, const QString& contextText, const QString& followingText, const KDevelop::CursorInRevision& position) const
20+
KDevelop::CodeCompletionContext* PythonCodeCompletionWorker::createCompletionContext(KDevelop::DUContextPointer context, const QString& contextText, const QString& /*followingText*/, const KDevelop::CursorInRevision& position) const
2121
{
2222
PythonCodeCompletionContext* completionContext = new PythonCodeCompletionContext(context, contextText, position, 0);
2323
return completionContext;

‎duchain/contextbuilder.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ void ContextBuilder::setEditor(PythonEditorIntegrator* editor)
103103
ContextBuilder::m_editor = editor;
104104
}
105105

106-
void ContextBuilder::setEditor(ParseSession* session)
106+
void ContextBuilder::setEditor(ParseSession* /*session*/)
107107
{
108108
PythonEditorIntegrator* e = new PythonEditorIntegrator(/*session*/);
109109
//m_identifierCompiler = new IdentifierCompiler(e->parseSession());
@@ -147,7 +147,7 @@ void ContextBuilder::addImportedContexts()
147147
}
148148
}
149149

150-
void ContextBuilder::openContextForStatementList( const QList<Ast*>& l, DUContext::ContextType type)
150+
void ContextBuilder::openContextForStatementList( const QList<Ast*>& l, DUContext::ContextType /*type*/)
151151
{
152152
if ( l.count() > 0 )
153153
{
@@ -229,7 +229,7 @@ void ContextBuilder::visitImport(ImportAst* node)
229229
{
230230
foreach ( AliasAst* name, node->names ) {
231231
// for "import ... as", use the as thingy, use the module name otherwise
232-
Identifier* variableDeclarationName = name->asName ? name->asName->identifier : name->name;
232+
// Identifier* variableDeclarationName = name->asName ? name->asName->identifier : name->name; # TODO check this
233233

234234
KUrl moduleFilePath = findModulePath(name->name->value);
235235
if ( ! moduleFilePath.isValid() ) continue;

‎duchain/declarationbuilder.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ void DeclarationBuilder::visitAssignment(AssignmentAst* node)
249249
void DeclarationBuilder::visitClassDefinition( ClassDefinitionAst* node )
250250
{
251251
kDebug() << "opening class definition";
252-
ClassDeclaration* classDec = new ClassDeclaration(editorFindRange(node->body.first(), node->body.last()), currentContext());
252+
// ClassDeclaration* classDec = new ClassDeclaration(editorFindRange(node->body.first(), node->body.last()), currentContext());
253253

254254
openDeclaration<ClassDeclaration>( node->name, node );
255255
eventuallyAssignInternalContext();

‎parser/ast.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ ExceptionHandlerAst::ExceptionHandlerAst(Ast* parent): Ast(parent, Ast::Exceptio
136136

137137
}
138138

139-
ExecAst::ExecAst(Ast* parent): StatementAst(parent, Ast::ExecAstType), body(0), locals(0), globals(0)
139+
ExecAst::ExecAst(Ast* parent): StatementAst(parent, Ast::ExecAstType), body(0), globals(0), locals(0)
140140
{
141141

142142
}

‎parser/astbuilder.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ CodeAst* AstBuilder::parseXmlAst(QString xml)
138138
return codeAst;
139139
}
140140

141-
void AstBuilder::parseXmlAstNode(QXmlStreamReader* xmlast, QXmlStreamReader::TokenType token = QXmlStreamReader::Invalid) {
141+
void AstBuilder::parseXmlAstNode(QXmlStreamReader* xmlast, QXmlStreamReader::TokenType /*token = QXmlStreamReader::Invalid*/) {
142142
bool nodeAdded = false;
143143

144144
while ( ! xmlast->atEnd() && ! xmlast->hasError() ) {
@@ -165,7 +165,7 @@ void AstBuilder::parseXmlAstNode(QXmlStreamReader* xmlast, QXmlStreamReader::Tok
165165
}
166166

167167
// this will push a parent onto the stack
168-
nodeAdded = parseAstNode(currentElementName, currentElementText, currentElementAttributes);
168+
nodeAdded = parseAstNode(currentElementName, /*currentElementText,*/ currentElementAttributes); // we might need ElementText some day
169169
if ( ! nodeAdded ) {
170170
m_isRealNodeMap.append(false);
171171
continue;
@@ -198,7 +198,7 @@ void AstBuilder::parseXmlAstNode(QXmlStreamReader* xmlast, QXmlStreamReader::Tok
198198
}
199199
}
200200

201-
bool AstBuilder::parseAstNode(QString name, QString text, const QList< QXmlStreamAttribute >& attributes)
201+
bool AstBuilder::parseAstNode(QString name, /*QString text, */ const QList< QXmlStreamAttribute >& attributes)
202202
{
203203
Ast* ast;
204204

‎parser/astbuilder.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class AstBuilder
5353
CodeAst* parseXmlAst(QString xml);
5454
QString getXmlForFile(KUrl filename, const QString& contents);
5555
void parseXmlAstNode(QXmlStreamReader* xmlast, QXmlStreamReader::TokenType token);
56-
bool parseAstNode(QString name, QString text, const QList<QXmlStreamAttribute>& attributes);
56+
bool parseAstNode(QString name, /*QString text, */const QList<QXmlStreamAttribute>& attributes);
5757

5858
KDevelop::TopDUContext* m_topContext;
5959

‎parser/pythondriver.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ void Driver::setCurrentDocument(KUrl url)
7070
m_currentDocument = url;
7171
}
7272

73-
QPair<CodeAst*, bool> Driver::parse( Python::CodeAst* ast )
73+
QPair<CodeAst*, bool> Driver::parse( Python::CodeAst* /* ast */)
7474
{
7575
AstBuilder pythonparser;
7676
QPair<CodeAst*, bool> matched;

‎pythonparsejob.cpp‎

Lines changed: 12 additions & 6 deletions

0 commit comments

Comments
 (0)