1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +02:00

compilation warnings

This commit is contained in:
Andrew Gvozdev 2010-04-29 02:06:32 +00:00
parent 25ded47847
commit 10c0826b58
18 changed files with 54 additions and 24 deletions

View file

@ -29,6 +29,7 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences() * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
*/ */
@Override
public void initializeDefaultPreferences() { public void initializeDefaultPreferences() {
IMakeBuilderInfo info = MakeCorePlugin.createBuildInfo(MakeCorePlugin.getDefault().getPluginPreferences(), MakeBuilder.BUILDER_ID, true); IMakeBuilderInfo info = MakeCorePlugin.createBuildInfo(MakeCorePlugin.getDefault().getPluginPreferences(), MakeBuilder.BUILDER_ID, true);
try { try {

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2006 QNX Software Systems and others. * Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -19,10 +19,12 @@ public class Else extends Conditional {
super(parent); super(parent);
} }
@Override
public boolean isElse() { public boolean isElse() {
return true; return true;
} }
@Override
public String toString() { public String toString() {
return GNUMakefileConstants.CONDITIONAL_ELSE; return GNUMakefileConstants.CONDITIONAL_ELSE;
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2006 QNX Software Systems and others. * Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -19,10 +19,12 @@ public class Endef extends Terminal {
super(parent); super(parent);
} }
@Override
public boolean isEndef() { public boolean isEndef() {
return true; return true;
} }
@Override
public String toString() { public String toString() {
return GNUMakefileConstants.TERMINAL_ENDEF; return GNUMakefileConstants.TERMINAL_ENDEF;
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2006 QNX Software Systems and others. * Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -18,11 +18,13 @@ public class Endif extends Terminal {
super(parent); super(parent);
} }
@Override
public boolean isEndif() { public boolean isEndif() {
return true; return true;
} }
public String toString() { @Override
public String toString() {
return GNUMakefileConstants.TERMINAL_ENDIF; return GNUMakefileConstants.TERMINAL_ENDIF;
} }
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2006 QNX Software Systems and others. * Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -19,6 +19,7 @@ public class ExportVariable extends VariableDefinition {
super(parent, name, value, type); super(parent, name, value, type);
} }
@Override
public boolean isExport() { public boolean isExport() {
return true; return true;
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2008 QNX Software Systems and others. * Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -55,7 +55,7 @@ public class GNUMakefileChecker extends ACBuilder {
} }
} }
protected Map validatorMap = new HashMap(); protected Map<IProject, IMakefileValidator> validatorMap = new HashMap<IProject, IMakefileValidator>();
public GNUMakefileChecker() { public GNUMakefileChecker() {
} }
@ -63,9 +63,13 @@ public class GNUMakefileChecker extends ACBuilder {
/** /**
* @see IncrementalProjectBuilder#build * @see IncrementalProjectBuilder#build
*/ */
protected IProject[] build(int kind, Map args, IProgressMonitor monitor) throws CoreException { @Override
if (DEBUG_EVENTS) protected IProject[] build(int kind, @SuppressWarnings("rawtypes") Map args, IProgressMonitor monitor) throws CoreException {
printEvent(kind, args); if (DEBUG_EVENTS) {
@SuppressWarnings("unchecked")
Map<String, String> pargs = args;
printEvent(kind, pargs);
}
IResourceDelta delta = null; IResourceDelta delta = null;
@ -73,7 +77,7 @@ public class GNUMakefileChecker extends ACBuilder {
if (kind != FULL_BUILD) { if (kind != FULL_BUILD) {
delta = getDelta(getProject()); delta = getDelta(getProject());
} }
if (delta == null || kind == FULL_BUILD) { if (delta == null || kind == FULL_BUILD) {
// Full build // Full build
checkProject(getProject(), monitor); checkProject(getProject(), monitor);
@ -131,7 +135,7 @@ public class GNUMakefileChecker extends ACBuilder {
} }
protected IMakefileValidator getMakefileValidator(IFile file) { protected IMakefileValidator getMakefileValidator(IFile file) {
IMakefileValidator validator = (IMakefileValidator) validatorMap.get(file.getProject()); IMakefileValidator validator = validatorMap.get(file.getProject());
if (validator == null) { if (validator == null) {
// FIXME: look int the preference store for a value. // FIXME: look int the preference store for a value.
validator = new GNUMakefileValidator(); validator = new GNUMakefileValidator();

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2006 QNX Software Systems and others. * Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -45,6 +45,7 @@ public class GNUTargetRule extends TargetRule {
/** /**
* @see java.lang.Object#toString() * @see java.lang.Object#toString()
*/ */
@Override
public String toString() { public String toString() {
StringBuffer buffer = new StringBuffer(); StringBuffer buffer = new StringBuffer();
buffer.append(getTarget().toString()); buffer.append(getTarget().toString());

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2006 QNX Software Systems and others. * Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -20,10 +20,12 @@ public class Ifdef extends Conditional {
super(parent, var, EMPTY, EMPTY); super(parent, var, EMPTY, EMPTY);
} }
@Override
public boolean isIfdef() { public boolean isIfdef() {
return true; return true;
} }
@Override
public String toString() { public String toString() {
StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IFDEF); StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IFDEF);
sb.append(' ').append(getVariable()); sb.append(' ').append(getVariable());

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2006 QNX Software Systems and others. * Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -19,10 +19,12 @@ public class Ifeq extends Conditional {
super(parent, cond); super(parent, cond);
} }
@Override
public boolean isIfeq() { public boolean isIfeq() {
return true; return true;
} }
@Override
public String toString() { public String toString() {
StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IFEQ); StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IFEQ);
sb.append(' ').append(getConditional()); sb.append(' ').append(getConditional());

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2006 QNX Software Systems and others. * Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -20,10 +20,12 @@ public class Ifndef extends Conditional {
super(parent, var, EMPTY, EMPTY); super(parent, var, EMPTY, EMPTY);
} }
@Override
public boolean isIfndef() { public boolean isIfndef() {
return true; return true;
} }
@Override
public String toString() { public String toString() {
StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IFNDEF); StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IFNDEF);
sb.append(' ').append(getVariable()); sb.append(' ').append(getVariable());

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2006 QNX Software Systems and others. * Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -19,10 +19,12 @@ public class Ifneq extends Conditional {
super(parent, cond); super(parent, cond);
} }
@Override
public boolean isIfneq() { public boolean isIfneq() {
return true; return true;
} }
@Override
public String toString() { public String toString() {
StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IFNEQ); StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IFNEQ);
sb.append(' ').append(getConditional()); sb.append(' ').append(getConditional());

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2008 QNX Software Systems and others. * Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -35,6 +35,7 @@ public class Include extends Parent implements IInclude {
dirs = directories; dirs = directories;
} }
@Override
public String toString() { public String toString() {
StringBuffer sb = new StringBuffer(GNUMakefileConstants.DIRECTIVE_INCLUDE); StringBuffer sb = new StringBuffer(GNUMakefileConstants.DIRECTIVE_INCLUDE);
for (int i = 0; i < filenames.length; i++) { for (int i = 0; i < filenames.length; i++) {
@ -61,6 +62,7 @@ public class Include extends Parent implements IInclude {
} }
@Override
public IDirective[] getDirectives() { public IDirective[] getDirectives() {
clearDirectives(); clearDirectives();
URI uri = getMakefile().getFileURI(); URI uri = getMakefile().getFileURI();

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2006 QNX Software Systems and others. * Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -19,6 +19,7 @@ public class OverrideDefine extends DefineVariable {
super(parent, name, value); super(parent, name, value);
} }
@Override
public String toString() { public String toString() {
StringBuffer sb = new StringBuffer(GNUMakefileConstants.VARIABLE_OVERRIDE + " " + GNUMakefileConstants.VARIABLE_DEFINE); //$NON-NLS-1$ StringBuffer sb = new StringBuffer(GNUMakefileConstants.VARIABLE_OVERRIDE + " " + GNUMakefileConstants.VARIABLE_DEFINE); //$NON-NLS-1$
sb.append(getName()).append('\n'); sb.append(getName()).append('\n');
@ -27,6 +28,7 @@ public class OverrideDefine extends DefineVariable {
return sb.toString(); return sb.toString();
} }
@Override
public boolean isOverride() { public boolean isOverride() {
return true; return true;
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2006 QNX Software Systems and others. * Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -19,6 +19,7 @@ public class OverrideVariable extends VariableDefinition {
super(parent, name, value, type); super(parent, name, value, type);
} }
@Override
public boolean isOverride() { public boolean isOverride() {
return true; return true;
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2006 QNX Software Systems and others. * Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -55,6 +55,7 @@ public class StaticTargetRule extends InferenceRule implements IInferenceRule {
/** /**
* @see java.lang.Object#toString() * @see java.lang.Object#toString()
*/ */
@Override
public String toString() { public String toString() {
StringBuffer buffer = new StringBuffer(); StringBuffer buffer = new StringBuffer();
buffer.append(getTarget()).append(':'); buffer.append(getTarget()).append(':');

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2006 QNX Software Systems and others. * Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -27,6 +27,7 @@ public class TargetVariable extends VariableDefinition {
this.override = override; this.override = override;
} }
@Override
public boolean isOverride() { public boolean isOverride() {
return override; return override;
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2006 QNX Software Systems and others. * Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -27,6 +27,7 @@ public abstract class Terminal extends Directive implements ITerminal {
return false; return false;
} }
@Override
public String toString() { public String toString() {
return "\n"; //$NON-NLS-1$ return "\n"; //$NON-NLS-1$
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2006 QNX Software Systems and others. * Copyright (c) 2000, 20010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -24,6 +24,7 @@ public class VPath extends Directive implements IVPath {
directories = dirs; directories = dirs;
} }
@Override
public String toString() { public String toString() {
StringBuffer sb = new StringBuffer(GNUMakefileConstants.DIRECTIVE_VPATH); StringBuffer sb = new StringBuffer(GNUMakefileConstants.DIRECTIVE_VPATH);
if (pattern != null && pattern.length() > 0) { if (pattern != null && pattern.length() > 0) {