mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fixes warnings
This commit is contained in:
parent
bfd296013f
commit
5001cf3e33
7 changed files with 14 additions and 19 deletions
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2005 IBM Corporation and others.
|
||||
* Copyright (c) 2005, 2008 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -12,6 +12,7 @@ package org.eclipse.cdt.internal.core.dom.parser;
|
|||
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.eclipse.cdt.core.model.IWorkingCopy;
|
||||
import org.eclipse.cdt.core.parser.CodeReader;
|
||||
import org.eclipse.cdt.core.parser.ICodeReaderCache;
|
||||
import org.eclipse.cdt.internal.core.parser.InternalParserUtil;
|
||||
|
@ -44,7 +45,7 @@ public class EmptyCodeReaderCache implements ICodeReaderCache {
|
|||
* @param workingCopies
|
||||
* @return
|
||||
*/
|
||||
public CodeReader createReader( String finalPath, Iterator workingCopies ) {
|
||||
public CodeReader createReader( String finalPath, Iterator<IWorkingCopy> workingCopies ) {
|
||||
return InternalParserUtil.createFileReader(finalPath);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2004, 2007 IBM Corporation and others.
|
||||
* Copyright (c) 2004, 2008 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -11,8 +11,6 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.core.dom.parser.c;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.ASTVisitor;
|
||||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||
|
@ -36,7 +34,8 @@ public abstract class CASTAmbiguity extends CASTNode {
|
|||
shouldVisitNames = true;
|
||||
}
|
||||
|
||||
public int visit(IASTName name) {
|
||||
@Override
|
||||
public int visit(IASTName name) {
|
||||
if (name != null) {
|
||||
namesPos++;
|
||||
names = (IASTName[]) ArrayUtil.append( IASTName.class, names, name );
|
||||
|
@ -54,7 +53,8 @@ public abstract class CASTAmbiguity extends CASTNode {
|
|||
|
||||
protected abstract IASTNode [] getNodes();
|
||||
|
||||
public boolean accept(ASTVisitor visitor) {
|
||||
@Override
|
||||
public boolean accept(ASTVisitor visitor) {
|
||||
IASTNode [] nodez = getNodes();
|
||||
int [] issues = new int[ nodez.length ];
|
||||
for( int i = 0; i < nodez.length; ++i )
|
||||
|
|
|
@ -243,7 +243,7 @@ public class CPPFunctionSpecialization extends CPPSpecialization implements ICPP
|
|||
}
|
||||
result.append(t != null ? ASTTypeUtil.getParameterTypeString(t) : "()"); //$NON-NLS-1$
|
||||
if (argumentMap != null) {
|
||||
result.append(" ");
|
||||
result.append(" "); //$NON-NLS-1$
|
||||
result.append(argumentMap.toString());
|
||||
}
|
||||
return result.toString();
|
||||
|
|
|
@ -130,7 +130,7 @@ public abstract class CPPSpecialization extends PlatformObject
|
|||
public String toString() {
|
||||
StringBuilder result = new StringBuilder(getName());
|
||||
if (argumentMap != null) {
|
||||
result.append(" ");
|
||||
result.append(" "); //$NON-NLS-1$
|
||||
result.append(argumentMap.toString());
|
||||
}
|
||||
return result.toString();
|
||||
|
|
|
@ -13,7 +13,6 @@ package org.eclipse.cdt.internal.core.dom.rewrite.changegenerator;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.IASTComment;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
|
||||
|
@ -131,12 +130,6 @@ public class ChangeGeneratorWriterVisitor extends ASTWriterVisitor {
|
|||
return PROCESS_SKIP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int leave(IASTComment comment) {
|
||||
super.leave(comment);
|
||||
return PROCESS_SKIP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int leave(IASTDeclaration declaration) {
|
||||
super.leave(declaration);
|
||||
|
|
|
@ -14,10 +14,10 @@ import java.util.Iterator;
|
|||
import java.util.NoSuchElementException;
|
||||
|
||||
|
||||
public final class EmptyIterator implements Iterator
|
||||
public final class EmptyIterator<T> implements Iterator<T>
|
||||
{
|
||||
|
||||
public static final EmptyIterator EMPTY_ITERATOR = new EmptyIterator();
|
||||
public static final EmptyIterator<?> EMPTY_ITERATOR = new EmptyIterator<Object>();
|
||||
|
||||
private EmptyIterator()
|
||||
{
|
||||
|
@ -34,7 +34,7 @@ public final class EmptyIterator implements Iterator
|
|||
/* (non-Javadoc)
|
||||
* @see java.util.Iterator#next()
|
||||
*/
|
||||
public final Object next()
|
||||
public final T next()
|
||||
{
|
||||
throw new NoSuchElementException();
|
||||
}
|
||||
|
|
|
@ -155,6 +155,7 @@ public class DBProperties {
|
|||
private static class DBProperty {
|
||||
static final int KEY = 0;
|
||||
static final int VALUE = 4;
|
||||
@SuppressWarnings("hiding")
|
||||
static final int RECORD_SIZE = 8;
|
||||
|
||||
Database db;
|
||||
|
|
Loading…
Add table
Reference in a new issue