mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
compilation warnings
This commit is contained in:
parent
4790e5993f
commit
f068ae1a89
10 changed files with 36 additions and 27 deletions
|
@ -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
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -75,6 +75,7 @@ public class Command extends Directive implements ICommand {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuffer cmd = new StringBuffer();
|
||||
cmd.append( '\t');
|
||||
|
|
|
@ -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
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -25,6 +25,7 @@ public class Comment extends Directive implements IComment {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
buffer.append(POUND_STRING).append(comment).append('\n');
|
||||
|
|
|
@ -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
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -27,6 +27,7 @@ public abstract class Directive implements IDirective {
|
|||
setLines(start, end);
|
||||
}
|
||||
|
||||
@Override
|
||||
public abstract String toString();
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
|
@ -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
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -22,6 +22,7 @@ public class EmptyLine extends Directive implements IEmptyLine {
|
|||
super(parent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return NL_STRING;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -41,10 +41,12 @@ public class NullMakefile extends AbstractMakefile {
|
|||
super(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IDirective[] getDirectives() {
|
||||
return EMPTY_DIRECTIVES;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IDirective[] getBuiltins() {
|
||||
return EMPTY_DIRECTIVES;
|
||||
}
|
||||
|
@ -52,6 +54,7 @@ public class NullMakefile extends AbstractMakefile {
|
|||
public void addDirective(IDirective directive) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new String();
|
||||
}
|
||||
|
|
|
@ -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
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -22,7 +22,7 @@ import org.eclipse.cdt.make.core.makefile.IDirective;
|
|||
|
||||
public abstract class Parent extends Directive implements IParent {
|
||||
|
||||
ArrayList children = new ArrayList();
|
||||
ArrayList<Directive> children = new ArrayList<Directive>();
|
||||
|
||||
public Parent(Directive parent) {
|
||||
super(parent);
|
||||
|
@ -34,7 +34,7 @@ public abstract class Parent extends Directive implements IParent {
|
|||
|
||||
public IDirective[] getDirectives() {
|
||||
children.trimToSize();
|
||||
return (IDirective[]) children.toArray(new IDirective[0]);
|
||||
return children.toArray(new IDirective[0]);
|
||||
}
|
||||
|
||||
public void addDirective(Directive directive) {
|
||||
|
@ -57,12 +57,13 @@ public abstract class Parent extends Directive implements IParent {
|
|||
|
||||
public Directive[] getStatements() {
|
||||
children.trimToSize();
|
||||
return (Directive[]) children.toArray(new Directive[0]);
|
||||
return children.toArray(new Directive[0]);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
IDirective[] directives = getDirectives();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007 Intel Corporation and others.
|
||||
* Copyright (c) 2007, 2010 Intel 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,9 @@
|
|||
package org.eclipse.cdt.make.internal.core.scannerconfig;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.cdt.core.settings.model.ICSettingBase;
|
||||
import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
|
||||
|
@ -32,7 +33,7 @@ import org.eclipse.core.runtime.Path;
|
|||
public abstract class CDataDiscoveredInfoProcessor {
|
||||
|
||||
public void applyDiscoveredInfo(CConfigurationData cfgData, DiscoveredSettingInfo dsIinfo){
|
||||
Map map = CDataUtil.createPathRcDataMap(cfgData);
|
||||
Map<IPath, CResourceData> map = CDataUtil.createPathRcDataMap(cfgData);
|
||||
IRcSettingInfo info;
|
||||
|
||||
PathSettingsContainer cr = PathSettingsContainer.createRootContainer();
|
||||
|
@ -46,7 +47,7 @@ public abstract class CDataDiscoveredInfoProcessor {
|
|||
}
|
||||
|
||||
if(map.size() != 0){
|
||||
CResourceData rcData = (CResourceData)map.get(Path.EMPTY);
|
||||
CResourceData rcData = map.get(Path.EMPTY);
|
||||
if(rcData != null){
|
||||
info = CDataDiscoveredInfoCalculator.createEmptyRcSettingInfo((CFolderData)rcData);
|
||||
applyInfo(cfgData, info, cr);
|
||||
|
@ -54,11 +55,11 @@ public abstract class CDataDiscoveredInfoProcessor {
|
|||
}
|
||||
|
||||
if(map.size() != 0){
|
||||
for(Iterator iter = map.entrySet().iterator(); iter.hasNext();){
|
||||
Map.Entry entry = (Map.Entry)iter.next();
|
||||
IPath path = (IPath)entry.getKey();
|
||||
Set<Entry<IPath, CResourceData>> entries = map.entrySet();
|
||||
for (Entry<IPath, CResourceData> entry : entries) {
|
||||
IPath path = entry.getKey();
|
||||
PathSettingsContainer curCr = cr.getChildContainer(path, false, false);
|
||||
rcData = (CResourceData)entry.getValue();
|
||||
rcData = entry.getValue();
|
||||
info = (IRcSettingInfo)curCr.getValue();
|
||||
applyInfo(cfgData, rcData, info);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2004, 2007 QNX Software Systems and others.
|
||||
* Copyright (c) 2004, 2010 QNX Software Systems 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
|
||||
|
@ -59,7 +59,7 @@ public class DiscoveredPathManager implements IDiscoveredPathManager, IResourceC
|
|||
// PathSettingsContainer fContainer = PathSettingsContainer.createRootContainer();
|
||||
|
||||
public IDiscoveredPathInfo getInfo(InfoContext context){
|
||||
return (IDiscoveredPathInfo)fInfoMap.get(context);
|
||||
return fInfoMap.get(context);
|
||||
}
|
||||
|
||||
// private Map getMap(IPath path, boolean create, boolean exactPath){
|
||||
|
@ -90,8 +90,8 @@ public class DiscoveredPathManager implements IDiscoveredPathManager, IResourceC
|
|||
|
||||
public IDiscoveredPathInfo setInfo(InfoContext context, IDiscoveredPathInfo info){
|
||||
if(info != null)
|
||||
return (IDiscoveredPathInfo)fInfoMap.put(context, info);
|
||||
return (IDiscoveredPathInfo)fInfoMap.remove(context);
|
||||
return fInfoMap.put(context, info);
|
||||
return fInfoMap.remove(context);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ public class DiscoveredPathManager implements IDiscoveredPathManager, IResourceC
|
|||
}
|
||||
|
||||
private DiscoveredInfoHolder getHolder(IProject project, boolean create){
|
||||
DiscoveredInfoHolder holder = (DiscoveredInfoHolder)fDiscoveredInfoHolderMap.get(project);
|
||||
DiscoveredInfoHolder holder = fDiscoveredInfoHolderMap.get(project);
|
||||
if(holder == null && create){
|
||||
holder = new DiscoveredInfoHolder();
|
||||
fDiscoveredInfoHolderMap.put(project, holder);
|
||||
|
@ -274,7 +274,7 @@ public class DiscoveredPathManager implements IDiscoveredPathManager, IResourceC
|
|||
// 1. clear DiscoveredPathManager's path info cache
|
||||
DiscoveredInfoHolder holder = getHolder(project, false);
|
||||
InfoContext context = new InfoContext(project);
|
||||
IDiscoveredPathInfo oldInfo = (IDiscoveredPathInfo) holder.getInfo(context);
|
||||
IDiscoveredPathInfo oldInfo = holder.getInfo(context);
|
||||
|
||||
// 2. switch the containers
|
||||
try {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2004, 2009 IBM Corporation and others.
|
||||
* Copyright (c) 2004, 2010 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
|
||||
|
@ -148,7 +148,7 @@ public class DefaultRunSIProvider implements IExternalScannerInfoProvider {
|
|||
cos.close();
|
||||
}
|
||||
catch (Exception e) {
|
||||
CCorePlugin.log(e);
|
||||
MakeCorePlugin.log(e);
|
||||
}
|
||||
finally {
|
||||
monitor.done();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2004, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2004, 2010 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
|
||||
|
@ -88,7 +88,7 @@ public class DefaultSIFileReader implements IExternalScannerInfoProvider {
|
|||
ConsoleOutputSniffer sniffer = ScannerInfoConsoleParserFactory.
|
||||
getMakeBuilderOutputSniffer(ostream, null, project, context, buildDirectory, buildInfo, markerGenerator, collector);
|
||||
if (sniffer != null) {
|
||||
ostream = (sniffer == null ? null : sniffer.getOutputStream());
|
||||
ostream = sniffer.getOutputStream();
|
||||
}
|
||||
|
||||
if (ostream != null) {
|
||||
|
|
Loading…
Add table
Reference in a new issue