Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTorbjörn Svensson2020-08-28 12:24:01 -0400
committerJonah Graham2020-08-28 21:19:14 -0400
commit4376632208b5f0cbfde4ea006229d8b6b3f762df (patch)
tree83f1ec67d8a16d61e8752a555ca71f538ccd7ba1 /build/org.eclipse.cdt.managedbuilder.core/src/org
parentf6016c5e0b42f5b46f456d15acd3a39fae6e6b23 (diff)
downloadorg.eclipse.cdt-4376632208b5f0cbfde4ea006229d8b6b3f762df.tar.gz
org.eclipse.cdt-4376632208b5f0cbfde4ea006229d8b6b3f762df.tar.xz
org.eclipse.cdt-4376632208b5f0cbfde4ea006229d8b6b3f762df.zip
Fixed "Dead code" compiler warning
Change-Id: Idc18751d1bcd59a8fa49529731e11dce354b925a Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
Diffstat (limited to 'build/org.eclipse.cdt.managedbuilder.core/src/org')
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java18
1 files changed, 3 insertions, 15 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java
index a59d13da68d..e770b48d5a0 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java
@@ -313,24 +313,14 @@ public class ManagedBuildManager extends AbstractCExtension {
e.printStackTrace();
}
- // Get the project types for this project and all referenced projects
- List<IProjectType> definedTypes = null;
- // To Do
-
// Create the array and copy the elements over
int size = projectTypes != null ? projectTypes.size() : 0;
- size += definedTypes != null ? definedTypes.size() : 0;
IProjectType[] types = new IProjectType[size];
- if (size > 0) {
- int n = 0;
- for (int i = 0; i < projectTypes.size(); i++)
- types[n++] = projectTypes.get(i);
-
- if (definedTypes != null)
- for (int i = 0; i < definedTypes.size(); i++)
- types[n++] = definedTypes.get(i);
+ int n = 0;
+ for (IProjectType type : projectTypes) {
+ types[n++] = type;
}
return types;
@@ -1951,8 +1941,6 @@ public class ManagedBuildManager extends AbstractCExtension {
// o The major versions are equal, but the remainder of the .cdtbuild version # is
// greater than the MBS version #
boolean compatible = false;
- if (version == null)
- compatible = false;
if (buildInfoVersion.getMajor() != version.getMajor())
compatible = false;
if (buildInfoVersion.getMinor() > version.getMinor())

Back to the top