Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlain Magloire2004-05-18 15:35:57 +0000
committerAlain Magloire2004-05-18 15:35:57 +0000
commit0a0eb69d98966030cfb2ea289a5f0e16b4edb520 (patch)
tree0a90aa8d6056f63cf7808e9a0d646a35d1387a70
parenta8037dbc3a352a483451927a5c74dc45c3980081 (diff)
downloadorg.eclipse.cdt-0a0eb69d98966030cfb2ea289a5f0e16b4edb520.tar.gz
org.eclipse.cdt-0a0eb69d98966030cfb2ea289a5f0e16b4edb520.tar.xz
org.eclipse.cdt-0a0eb69d98966030cfb2ea289a5f0e16b4edb520.zip
2004-05-18 Alain Magloire
Remove warnings and compatibility plugin to be full Eclipse-3.0 compliant.
-rw-r--r--core/org.eclipse.cdt.core/ChangeLog5
-rw-r--r--core/org.eclipse.cdt.core/dependency/org/eclipse/cdt/internal/core/sourcedependency/UpdateDependency.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/BinaryRunner.java3
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryManager.java9
-rw-r--r--core/org.eclipse.cdt.core/plugin.xml2
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePlugin.java50
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/internal/filetype/CFileTypeResolver.java6
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CDescriptor.java10
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CDescriptorManager.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/TimeOut.java1
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/PE.java3
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/Dwarf.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/stabs/Stabs.java46
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/tools/DebugDump.java3
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/Elf.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/pty/PTYInputStream.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/spawner/SpawnerInputStream.java2
17 files changed, 84 insertions, 70 deletions
diff --git a/core/org.eclipse.cdt.core/ChangeLog b/core/org.eclipse.cdt.core/ChangeLog
index 912957e19ef..369b50b8f7a 100644
--- a/core/org.eclipse.cdt.core/ChangeLog
+++ b/core/org.eclipse.cdt.core/ChangeLog
@@ -1,3 +1,8 @@
+2004-05-18 Alain Magloire
+
+ Remove warnings and compatibility plugin
+ to be full Eclipse-3.0 compliant.
+
2004-05-11 Alain Magloire
Preliminary work to get Parser IProblem in the CEditor.
diff --git a/core/org.eclipse.cdt.core/dependency/org/eclipse/cdt/internal/core/sourcedependency/UpdateDependency.java b/core/org.eclipse.cdt.core/dependency/org/eclipse/cdt/internal/core/sourcedependency/UpdateDependency.java
index fd66bda8bf9..d966ce4c7e0 100644
--- a/core/org.eclipse.cdt.core/dependency/org/eclipse/cdt/internal/core/sourcedependency/UpdateDependency.java
+++ b/core/org.eclipse.cdt.core/dependency/org/eclipse/cdt/internal/core/sourcedependency/UpdateDependency.java
@@ -71,7 +71,7 @@ public class UpdateDependency implements IJob {
IndexManager indexManager = CCorePlugin.getDefault().getCoreModel().getIndexManager();
indexManager.performConcurrentJob(
new PatternSearchJob(
- (CSearchPattern) pattern,
+ pattern,
scope,
pathCollector,
indexManager
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/BinaryRunner.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/BinaryRunner.java
index f92c8ea0a70..ecec0c611d5 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/BinaryRunner.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/BinaryRunner.java
@@ -10,7 +10,6 @@ import org.eclipse.cdt.core.model.CModelException;
import org.eclipse.cdt.core.model.CoreModel;
import org.eclipse.cdt.core.model.ElementChangedEvent;
import org.eclipse.cdt.core.model.ICElement;
-import org.eclipse.cdt.core.model.ICModel;
import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
@@ -87,7 +86,7 @@ public class BinaryRunner {
ICElement[] children = container.getChildren();
if (children.length > 0) {
CModelManager factory = CModelManager.getDefault();
- ICElement root = (ICModel) factory.getCModel();
+ ICElement root = factory.getCModel();
CElementDelta cdelta = new CElementDelta(root);
cdelta.added(cproject);
cdelta.added(container);
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryManager.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryManager.java
index cf28df127c9..492d8976c6b 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryManager.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryManager.java
@@ -497,7 +497,7 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
if (core == null) {
return null;
}
- IExtensionPoint extension = core.getDescriptor().getExtensionPoint(CONTAINER_INITIALIZER_EXTPOINT_ID);
+ IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, CONTAINER_INITIALIZER_EXTPOINT_ID);
if (extension != null) {
IExtension[] extensions = extension.getExtensions();
for (int i = 0; i < extensions.length; i++) {
@@ -565,6 +565,11 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
}
public void saveRawPathEntries(ICProject cproject, IPathEntry[] entries) throws CModelException {
+ // sanity
+ if (entries == null) {
+ entries = NO_PATHENTRIES;
+ }
+
ArrayList list = new ArrayList(entries.length);
IPath projectPath = cproject.getPath();
for (int i = 0; i < entries.length; i++) {
@@ -787,7 +792,7 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
return null;
}
ArrayList containerIDList = new ArrayList(5);
- IExtensionPoint extension = core.getDescriptor().getExtensionPoint(CONTAINER_INITIALIZER_EXTPOINT_ID);
+ IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, CONTAINER_INITIALIZER_EXTPOINT_ID);
if (extension != null) {
IExtension[] extensions = extension.getExtensions();
for (int i = 0; i < extensions.length; i++) {
diff --git a/core/org.eclipse.cdt.core/plugin.xml b/core/org.eclipse.cdt.core/plugin.xml
index 5dd357fea56..6b110816068 100644
--- a/core/org.eclipse.cdt.core/plugin.xml
+++ b/core/org.eclipse.cdt.core/plugin.xml
@@ -18,7 +18,7 @@
<requires>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.team.core"/>
- <import plugin="org.eclipse.core.runtime.compatibility"/>
+ <import plugin="org.eclipse.core.runtime"/>
</requires>
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePlugin.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePlugin.java
index c689ee94503..bdab6143f13 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePlugin.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePlugin.java
@@ -39,7 +39,6 @@ import org.eclipse.cdt.internal.core.search.indexing.IndexManager;
import org.eclipse.cdt.internal.core.search.indexing.SourceIndexer;
import org.eclipse.cdt.internal.core.search.matching.MatchLocator;
import org.eclipse.cdt.internal.core.search.processing.JobManager;
-import org.eclipse.core.boot.BootLoader;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectDescription;
import org.eclipse.core.resources.IWorkspace;
@@ -49,7 +48,6 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IPluginDescriptor;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
@@ -59,6 +57,7 @@ import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Preferences;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.SubProgressMonitor;
+import org.osgi.framework.BundleContext;
public class CCorePlugin extends Plugin {
@@ -216,34 +215,37 @@ public class CCorePlugin extends Plugin {
// ------ CPlugin
- public CCorePlugin(IPluginDescriptor descriptor) {
- super(descriptor);
+ public CCorePlugin() {
+ super();
fgCPlugin = this;
}
/**
* @see Plugin#shutdown
*/
- public void shutdown() throws CoreException {
- if (fDescriptorManager != null) {
- fDescriptorManager.shutdown();
- }
-
- if (fCoreModel != null) {
- fCoreModel.shutdown();
- }
-
- if (cdtLog != null) {
- cdtLog.shutdown();
+ public void stop(BundleContext context) throws Exception {
+ try {
+ if (fDescriptorManager != null) {
+ fDescriptorManager.shutdown();
+ }
+
+ if (fCoreModel != null) {
+ fCoreModel.shutdown();
+ }
+
+ if (cdtLog != null) {
+ cdtLog.shutdown();
+ }
+ } finally {
+ super.stop(context);
}
- super.shutdown();
}
/**
* @see Plugin#startup
*/
- public void startup() throws CoreException {
- super.startup();
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
cdtLog = new CDTLogWriter(CCorePlugin.getDefault().getStateLocation().append(".log").toFile()); //$NON-NLS-1$
@@ -464,7 +466,7 @@ public class CCorePlugin extends Plugin {
public IConsole getConsole(String id) {
try {
- IExtensionPoint extension = getDescriptor().getExtensionPoint("CBuildConsole"); //$NON-NLS-1$
+ IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, "CBuildConsole"); //$NON-NLS-1$
if (extension != null) {
IExtension[] extensions = extension.getExtensions();
for (int i = 0; i < extensions.length; i++) {
@@ -612,7 +614,7 @@ public class CCorePlugin extends Plugin {
if (id == null || id.length() == 0) {
id = DEFAULT_BINARY_PARSER_UNIQ_ID;
}
- IExtensionPoint extensionPoint = getDescriptor().getExtensionPoint(BINARY_PARSER_SIMPLE_ID);
+ IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, BINARY_PARSER_SIMPLE_ID);
IExtension extension = extensionPoint.getExtension(id);
if (extension != null) {
IConfigurationElement element[] = extension.getConfigurationElements();
@@ -821,7 +823,7 @@ public class CCorePlugin extends Plugin {
* @return IProcessList
*/
public IProcessList getProcessList() throws CoreException {
- IExtensionPoint extension = getDescriptor().getExtensionPoint("ProcessList"); //$NON-NLS-1$
+ IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, "ProcessList"); //$NON-NLS-1$
if (extension != null) {
IExtension[] extensions = extension.getExtensions();
IConfigurationElement defaultContributor = null;
@@ -834,7 +836,7 @@ public class CCorePlugin extends Plugin {
if (defaultContributor == null) {
defaultContributor = configElements[j];
}
- } else if (platform.equals(BootLoader.getOS())) {
+ } else if (platform.equals(Platform.getOS())) {
// found explicit contributor for this platform.
return (IProcessList) configElements[0].createExecutableExtension("class"); //$NON-NLS-1$
}
@@ -854,7 +856,7 @@ public class CCorePlugin extends Plugin {
* @return
*/
public String[] getAllErrorParsersIDs() {
- IExtensionPoint extension = getDescriptor().getExtensionPoint(ERROR_PARSER_SIMPLE_ID);
+ IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, ERROR_PARSER_SIMPLE_ID);
String[] empty = new String[0];
if (extension != null) {
IExtension[] extensions = extension.getExtensions();
@@ -870,7 +872,7 @@ public class CCorePlugin extends Plugin {
public IErrorParser[] getErrorParser(String id) {
IErrorParser[] empty = new IErrorParser[0];
try {
- IExtensionPoint extension = getDescriptor().getExtensionPoint(ERROR_PARSER_SIMPLE_ID);
+ IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, ERROR_PARSER_SIMPLE_ID);
if (extension != null) {
IExtension[] extensions = extension.getExtensions();
List list = new ArrayList(extensions.length);
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/internal/filetype/CFileTypeResolver.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/internal/filetype/CFileTypeResolver.java
index 264f45fc450..ad10879ec92 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/internal/filetype/CFileTypeResolver.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/internal/filetype/CFileTypeResolver.java
@@ -30,6 +30,7 @@ import org.eclipse.cdt.core.filetype.ICLanguage;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.Platform;
/**
* @author sam.robb
@@ -346,7 +347,7 @@ public class CFileTypeResolver implements ICFileTypeResolver {
* @return the extension point, or null
*/
private IExtensionPoint getExtensionPoint(String extensionPointId) {
- return CCorePlugin.getDefault().getDescriptor().getExtensionPoint(extensionPointId);
+ return Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, extensionPointId);
}
/**
@@ -406,7 +407,8 @@ public class CFileTypeResolver implements ICFileTypeResolver {
String line = null;
try {
- baseURL = element.getDeclaringExtension().getDeclaringPluginDescriptor().getInstallURL();
+ //baseURL = element.getDeclaringExtension().getDeclaringPluginDescriptor().getInstallURL();
+ baseURL = Platform.getBundle(element.getDeclaringExtension().getNamespace()).getEntry("/"); //$NON-NLS-1$
fileURL = new URL(baseURL, attr);
in = new BufferedReader(new InputStreamReader(fileURL.openStream()));
line = in.readLine();
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CDescriptor.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CDescriptor.java
index 17f52de18dd..f8da5c018ae 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CDescriptor.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CDescriptor.java
@@ -44,8 +44,8 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IPluginRegistry;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
@@ -519,8 +519,8 @@ public class CDescriptor implements ICDescriptor {
protected ICExtension createExtensions(ICExtensionReference ext) throws CoreException {
InternalCExtension cExtension = null;
- IPluginRegistry pluginRegistry = Platform.getPluginRegistry();
- IExtensionPoint extensionPoint = pluginRegistry.getExtensionPoint(ext.getExtension());
+ IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry();
+ IExtensionPoint extensionPoint = extensionRegistry.getExtensionPoint(ext.getExtension());
IExtension extension = extensionPoint.getExtension(ext.getID());
if (extension == null) {
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, -1,
@@ -539,8 +539,8 @@ public class CDescriptor implements ICDescriptor {
}
protected IConfigurationElement[] getConfigurationElement(ICExtensionReference ext) throws CoreException {
- IPluginRegistry pluginRegistry = Platform.getPluginRegistry();
- IExtensionPoint extensionPoint = pluginRegistry.getExtensionPoint(ext.getExtension());
+ IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry();
+ IExtensionPoint extensionPoint = extensionRegistry.getExtensionPoint(ext.getExtension());
IExtension extension = extensionPoint.getExtension(ext.getID());
if (extension == null) {
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, -1,
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CDescriptorManager.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CDescriptorManager.java
index feabbee6d46..1ad2a67a82a 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CDescriptorManager.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CDescriptorManager.java
@@ -182,7 +182,7 @@ public class CDescriptorManager implements ICDescriptorManager, IResourceChangeL
}
private void initializeOwnerConfiguration() {
- IExtensionPoint extpoint = CCorePlugin.getDefault().getDescriptor().getExtensionPoint("CProject"); //$NON-NLS-1$
+ IExtensionPoint extpoint = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, "CProject"); //$NON-NLS-1$
IExtension extension[] = extpoint.getExtensions();
fOwnerConfigMap = new HashMap(extension.length);
for (int i = 0; i < extension.length; i++) {
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/TimeOut.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/TimeOut.java
index 29e4f556681..d4d1a35455f 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/TimeOut.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/TimeOut.java
@@ -10,7 +10,6 @@
***********************************************************************/
package org.eclipse.cdt.utils;
-import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IProgressMonitor;
/**
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/PE.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/PE.java
index fcdb9fbb71d..71ba366b327 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/PE.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/PE.java
@@ -473,7 +473,8 @@ public class PE {
ReadMemoryAccess memory = new ReadMemoryAccess(data, true);
int idx = 0;
try {
- Exe.ExeHeader exeHdr = new Exe.ExeHeader(memory);
+ //Exe.ExeHeader exeHdr = new Exe.ExeHeader(memory);
+ new Exe.ExeHeader(memory);
DOSHeader dosHdr = new DOSHeader(memory);
// Jump the Coff header, and Check the sig.
idx = dosHdr.e_lfanew;
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/Dwarf.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/Dwarf.java
index cbf7cb4f384..8dfd3dc6d2a 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/Dwarf.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/Dwarf.java
@@ -127,7 +127,7 @@ public class Dwarf {
sb.append(':');
for (int i = 0; i < len; i++) {
byte b = Array.getByte(value, i);
- sb.append(' ').append(Integer.toHexString((int) b));
+ sb.append(' ').append(Integer.toHexString(b));
}
} else {
if (value instanceof Number) {
@@ -506,7 +506,7 @@ public class Dwarf {
case DwarfConstants.DW_FORM_strp :
{
- int offset = (int) read_4_bytes(in);
+ int offset = read_4_bytes(in);
byte[] data = (byte[]) dwarfSections.get(DWARF_DEBUG_STR);
if (data == null) {
obj = new String();
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/stabs/Stabs.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/stabs/Stabs.java
index 61e786c8dda..ffdeb092201 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/stabs/Stabs.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/stabs/Stabs.java
@@ -129,7 +129,7 @@ public class Stabs {
}
public void parse(IDebugEntryRequestor requestor) {
- List list = new ArrayList();
+ //List list = new ArrayList();
long nstab = stabData.length / StabConstant.SIZE;
int i, offset;
String holder = null;
@@ -455,7 +455,7 @@ public class Stabs {
String infoField = sf.getTypeInformation();
// According to the doc 't' can follow the 'T'
if (infoField.length() > 0 && infoField.charAt(0) == 't') {
- String s = infoField.substring(1);
+ //String s = infoField.substring(1);
parseStabString(requestor, field, value);
} else {
// Just register the type.
@@ -763,34 +763,34 @@ public class Stabs {
StringBuffer sb = new StringBuffer();
// get the width
- int width = 0;
+ //int width = 0;
while ((c = reader.read()) != -1) {
if (c == ';') {
break;
}
sb.append((char) c);
}
- try {
- String token = sb.toString();
- width = Integer.parseInt(token);
- } catch (NumberFormatException e) {
- }
+ //try {
+ // String token = sb.toString();
+ // width = Integer.parseInt(token);
+ //} catch (NumberFormatException e) {
+ //}
sb.setLength(0);
// get the offset
- int offset = 0;
+ //int offset = 0;
while ((c = reader.read()) != -1) {
if (c == ';') {
break;
}
sb.append((char) c);
}
- try {
- String token = sb.toString();
- offset = Integer.parseInt(token);
- } catch (NumberFormatException e) {
- }
+ //try {
+ //String token = sb.toString();
+ //offset = Integer.parseInt(token);
+ //} catch (NumberFormatException e) {
+ //}
sb.setLength(0);
@@ -823,18 +823,18 @@ public class Stabs {
StringBuffer sb = new StringBuffer();
// get the fp-Type
- int fpType = 0;
+ //int fpType = 0;
while ((c = reader.read()) != -1) {
if (c == ';') {
break;
}
sb.append((char) c);
}
- try {
- String token = sb.toString();
- fpType = Integer.parseInt(token);
- } catch (NumberFormatException e) {
- }
+ //try {
+ // String token = sb.toString();
+ //fpType = Integer.parseInt(token);
+ //} catch (NumberFormatException e) {
+ //}
sb.setLength(0);
@@ -858,7 +858,8 @@ public class Stabs {
case 'c' :
case 'g' :
{
- DebugType type = parseStabType(name, reader);
+ //DebugType type = parseStabType(name, reader);
+ parseStabType(name, reader);
int c = reader.read(); // semicolon
StringBuffer sb = new StringBuffer();
int nbits = 0;
@@ -885,7 +886,8 @@ public class Stabs {
// we only understand range for an array.
int c = reader.read();
if (c == 'r') {
- DebugType index_type = parseStabType("", reader); //$NON-NLS-1$
+ //DebugType index_type = parseStabType("", reader); //$NON-NLS-1$
+ parseStabType("", reader); //$NON-NLS-1$
c = reader.read();
// Check ';'
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/tools/DebugDump.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/tools/DebugDump.java
index 1bc16fac655..3e27e9a4efc 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/tools/DebugDump.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/tools/DebugDump.java
@@ -12,7 +12,6 @@
package org.eclipse.cdt.utils.debug.tools;
import java.io.BufferedWriter;
-import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
@@ -302,7 +301,7 @@ public class DebugDump implements IDebugEntryRequestor {
public static void main(String[] args) {
try {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
+ //ByteArrayOutputStream out = new ByteArrayOutputStream();
DebugDump dump = new DebugDump(System.out);
dump.parse(args[0]);
} catch (IOException e) {
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/Elf.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/Elf.java
index 63391a4e926..2f026e38b78 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/Elf.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/Elf.java
@@ -350,7 +350,7 @@ public class Elf {
} else if ( obj instanceof Long ) {
Long val = (Long)obj;
anotherVal = val.longValue();
- thisVal = (long)this.st_value;
+ thisVal = this.st_value;
}
return (thisVal<anotherVal ? -1 : (thisVal==anotherVal ? 0 : 1));
}
@@ -1028,7 +1028,7 @@ public class Elf {
tmp[1] = (short)((val >> 8) & 0x00ff);
tmp[2] = (short)((val >> 16) & 0x00ff);
tmp[3] = (short)((val >> 24) & 0x00ff);
- return (long)((tmp[0] << 24) + (tmp[1] << 16) + (tmp[2] << 8) + tmp[3]);
+ return ((tmp[0] << 24) + (tmp[1] << 16) + (tmp[2] << 8) + tmp[3]);
}
return val;
}
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/pty/PTYInputStream.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/pty/PTYInputStream.java
index aa4a4396c8f..692ecea92cf 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/pty/PTYInputStream.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/pty/PTYInputStream.java
@@ -32,7 +32,7 @@ class PTYInputStream extends InputStream {
byte b[] = new byte[1];
if (1 != read(b, 0, 1))
return -1;
- return (int) b[0];
+ return b[0];
}
/**
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/spawner/SpawnerInputStream.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/spawner/SpawnerInputStream.java
index 2c682216671..e552443fa06 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/spawner/SpawnerInputStream.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/spawner/SpawnerInputStream.java
@@ -30,7 +30,7 @@ class SpawnerInputStream extends InputStream {
byte b[] = new byte[1];
if (1 != read(b, 0, 1))
return -1;
- return (int) b[0];
+ return b[0];
}
/**

Back to the top