diff options
author | qouyang <qouyang@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-07-07 01:53:47 +0000 |
---|---|---|
committer | qouyang <qouyang@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-07-07 01:53:47 +0000 |
commit | a84091c4be5c230e662d0ee5960720287cd7dae6 (patch) | |
tree | 80501cea4d31c25db25f8c0f8f6475f91c80d099 /Tools | |
parent | 0e0e9d3d98f5811eb7c8eb3b9dc0491b1b648a0b (diff) | |
download | edk2-platforms-a84091c4be5c230e662d0ee5960720287cd7dae6.tar.xz |
Remove build warning.
Fixed bug:
EdkT81,
EdkT83,
EdkT77,
EdkT84.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@810 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools')
9 files changed, 54 insertions, 92 deletions
diff --git a/Tools/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java b/Tools/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java index 3147a24538..300433081d 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java +++ b/Tools/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java @@ -264,29 +264,6 @@ public class AutoGen { // moduleType.
//
moduleType = SurfaceAreaQuery.getModuleType();
-// switch (CommonDefinition.getModuleType(moduleType)) {
-// case CommonDefinition.ModuleTypeDxeCore:
-// case CommonDefinition.ModuleTypeDxeDriver:
-// case CommonDefinition.ModuleTypeDxeRuntimeDriver:
-// case CommonDefinition.ModuleTypeDxeSmmDriver:
-// case CommonDefinition.ModuleTypeDxeSalDriver:
-// case CommonDefinition.ModuleTypeUefiDriver:
-// case CommonDefinition.ModuleTypeUefiApplication:
-// fileBuffer.append(CommonDefinition.autoGenHLine1);
-// break;
-// default:
-// fileBuffer.append(CommonDefinition.autoGenHVersionDefault);
-// break;
-// }
-// switch (CommonDefinition.getModuleType(moduleType)) {
-// case CommonDefinition.ModuleTypeUefiDriver:
-// case CommonDefinition.ModuleTypeUefiApplication:
-// fileBuffer.append(CommonDefinition.autoGenHReleaseDefault);
-// break;
-// default:
-// fileBuffer.append(CommonDefinition.autoGenHLine2);
-// break;
-// }
//
// Add "extern int __make_me_compile_correctly;" at begin of
@@ -308,7 +285,7 @@ public class AutoGen { // PackageIdentification[] consumedPkgIdList = SurfaceAreaQuery
// .getDependencePkg(this.arch);
PackageIdentification[] consumedPkgIdList = SurfaceAreaQuery
- .getDependencePkg(null);
+ .getDependencePkg(this.arch);
if (consumedPkgIdList != null) {
headerFileList = depPkgToAutogenH(consumedPkgIdList, moduleType);
item = headerFileList.iterator();
@@ -891,21 +868,17 @@ public class AutoGen { fileBuffer.append("{\r\n");
fileBuffer.append(" return EFI_SUCCESS;\r\n");
fileBuffer.append("}\r\n\r\n");
- break;
+
} else {
for (int i = 0; i < entryPointList.length; i++) {
- if (!entryPointList[i].equals("")) {
- fileBuffer.append("EFI_STATUS\r\n");
- fileBuffer.append("EFIAPI\r\n");
- fileBuffer.append(entryPointList[i]);
- fileBuffer.append(" (\r\n");
- fileBuffer.append(" IN EFI_HANDLE ImageHandle,\r\n");
- fileBuffer.append(" IN EFI_SYSTEM_TABLE *SystemTable\r\n");
- fileBuffer.append(" );\r\n");
- entryPointCount++;
- } else {
- break;
- }
+ fileBuffer.append("EFI_STATUS\r\n");
+ fileBuffer.append("EFIAPI\r\n");
+ fileBuffer.append(entryPointList[i]);
+ fileBuffer.append(" (\r\n");
+ fileBuffer.append(" IN EFI_HANDLE ImageHandle,\r\n");
+ fileBuffer.append(" IN EFI_SYSTEM_TABLE *SystemTable\r\n");
+ fileBuffer.append(" );\r\n");
+ entryPointCount++;
}
fileBuffer
.append("GLOBAL_REMOVE_IF_UNREFERENCED const UINT8 _gDriverEntryPointCount = ");
@@ -962,27 +935,24 @@ public class AutoGen { entryPointList = CommonDefinition.remDupString(entryPointList);
entryPointCount = 0;
- fileBuffer
- .append("GLOBAL_REMOVE_IF_UNREFERENCED const UINT8 _gDriverUnloadImageCount = ");
- fileBuffer.append(Integer.toString(entryPointCount));
- fileBuffer.append(";\r\n\r\n");
-
if (entryPointList != null) {
for (int i = 0; i < entryPointList.length; i++) {
- if (!entryPointList[i].equals("")) {
- fileBuffer.append("EFI_STATUS\r\n");
- fileBuffer.append("EFIAPI\r\n");
- fileBuffer.append(entryPointList[i]);
- fileBuffer.append(" (\r\n");
- fileBuffer
- .append(" IN EFI_HANDLE ImageHandle\r\n");
- fileBuffer.append(" );\r\n");
- } else {
- break;
- }
- }
+ fileBuffer.append("EFI_STATUS\r\n");
+ fileBuffer.append("EFIAPI\r\n");
+ fileBuffer.append(entryPointList[i]);
+ fileBuffer.append(" (\r\n");
+ fileBuffer
+ .append(" IN EFI_HANDLE ImageHandle\r\n");
+ fileBuffer.append(" );\r\n");
+ entryPointCount++;
+ }
}
+ fileBuffer
+ .append("GLOBAL_REMOVE_IF_UNREFERENCED const UINT8 _gDriverUnloadImageCount = ");
+ fileBuffer.append(Integer.toString(entryPointCount));
+ fileBuffer.append(";\r\n\r\n");
+
fileBuffer.append("EFI_STATUS\r\n");
fileBuffer.append("EFIAPI\r\n");
fileBuffer.append("ProcessModuleUnloadList (\r\n");
@@ -1135,18 +1105,14 @@ public class AutoGen { entryPointCount = 0;
if (entryPointList != null) {
for (int i = 0; i < entryPointList.length; i++) {
- if (!entryPointList[i].equals("")) {
- fileBuffer.append("EFI_STATUS\r\n");
- fileBuffer.append("EFIAPI\r\n");
- fileBuffer.append(entryPointList[i]);
- fileBuffer.append(" (\r\n");
- fileBuffer
- .append(" IN EFI_HANDLE ImageHandle\r\n");
- fileBuffer.append(" );\r\n");
- entryPointCount++;
- } else {
- break;
- }
+ fileBuffer.append("EFI_STATUS\r\n");
+ fileBuffer.append("EFIAPI\r\n");
+ fileBuffer.append(entryPointList[i]);
+ fileBuffer.append(" (\r\n");
+ fileBuffer
+ .append(" IN EFI_HANDLE ImageHandle\r\n");
+ fileBuffer.append(" );\r\n");
+ entryPointCount++;
}
}
@@ -1155,22 +1121,6 @@ public class AutoGen { fileBuffer.append(Integer.toString(entryPointCount));
fileBuffer.append(";\r\n\r\n");
- if (entryPointList != null) {
- for (int i = 0; i < entryPointList.length; i++) {
- if (!entryPointList[i].equals("")) {
- fileBuffer.append("EFI_STATUS\r\n");
- fileBuffer.append("EFIAPI\r\n");
- fileBuffer.append(entryPointList[i]);
- fileBuffer.append(" (\r\n");
- fileBuffer
- .append(" IN EFI_HANDLE ImageHandle\r\n");
- fileBuffer.append(" );\r\n");
- } else {
- break;
- }
- }
- }
-
fileBuffer.append("EFI_STATUS\n");
fileBuffer.append("EFIAPI\r\n");
fileBuffer.append("ProcessModuleUnloadList (\r\n");
diff --git a/Tools/Source/GenBuild/org/tianocore/build/exception/AutoGenException.java b/Tools/Source/GenBuild/org/tianocore/build/exception/AutoGenException.java index 0faf6c7113..fb6a9c2fe1 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/exception/AutoGenException.java +++ b/Tools/Source/GenBuild/org/tianocore/build/exception/AutoGenException.java @@ -20,7 +20,7 @@ package org.tianocore.build.exception; The class handle the exception throwed by entity class.
**/
public class AutoGenException extends GenBuildException {
- //static final long serialVersionUID = -8034897190740066939L;
+ static final long serialVersionUID = -8034897190740066939L;
/**
Constructure function
diff --git a/Tools/Source/GenBuild/org/tianocore/build/exception/EdkException.java b/Tools/Source/GenBuild/org/tianocore/build/exception/EdkException.java index 8be839bb48..086ecd8865 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/exception/EdkException.java +++ b/Tools/Source/GenBuild/org/tianocore/build/exception/EdkException.java @@ -19,7 +19,7 @@ package org.tianocore.build.exception; The class handle the exception throwed by entity class.
**/
public class EdkException extends Exception {
- //static final long serialVersionUID = -8034897190740066939L;
+ static final long serialVersionUID = -8034897190740066938L;
/**
Constructure function
diff --git a/Tools/Source/GenBuild/org/tianocore/build/exception/GenBuildException.java b/Tools/Source/GenBuild/org/tianocore/build/exception/GenBuildException.java index 7ae0580591..51e0bd1f89 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/exception/GenBuildException.java +++ b/Tools/Source/GenBuild/org/tianocore/build/exception/GenBuildException.java @@ -21,7 +21,7 @@ import org.tianocore.exception.EdkException; The class handle the exception throwed by entity class.
**/
public class GenBuildException extends EdkException {
- //static final long serialVersionUID = -8034897190740066939L;
+ static final long serialVersionUID = -8034897190740066937L;
/**
Constructure function
diff --git a/Tools/Source/GenBuild/org/tianocore/build/exception/PcdAutogenException.java b/Tools/Source/GenBuild/org/tianocore/build/exception/PcdAutogenException.java index 49d5543e11..d11e041695 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/exception/PcdAutogenException.java +++ b/Tools/Source/GenBuild/org/tianocore/build/exception/PcdAutogenException.java @@ -19,7 +19,7 @@ package org.tianocore.build.exception; The class handle the exception throwed by entity class.
**/
public class PcdAutogenException extends AutoGenException {
- //static final long serialVersionUID = -8034897190740066939L;
+ static final long serialVersionUID = -8034897190740066936L;
/**
Constructure function
diff --git a/Tools/Source/GenBuild/org/tianocore/build/exception/TianoToolsException.java b/Tools/Source/GenBuild/org/tianocore/build/exception/TianoToolsException.java index 2daa8716b2..87505e49b1 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/exception/TianoToolsException.java +++ b/Tools/Source/GenBuild/org/tianocore/build/exception/TianoToolsException.java @@ -21,7 +21,7 @@ import org.tianocore.exception.EdkException; The class handle the exception throwed by entity class.
**/
public class TianoToolsException extends EdkException {
- //static final long serialVersionUID = -8034897190740066939L;
+ static final long serialVersionUID = -8034897190740066935L;
/**
Constructure function
diff --git a/Tools/Source/GenBuild/org/tianocore/build/exception/XmlParseException.java b/Tools/Source/GenBuild/org/tianocore/build/exception/XmlParseException.java index afa92f4598..0ba1a787aa 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/exception/XmlParseException.java +++ b/Tools/Source/GenBuild/org/tianocore/build/exception/XmlParseException.java @@ -19,7 +19,7 @@ package org.tianocore.build.exception; The class handle the exception throwed by entity class.
**/
public class XmlParseException extends GenBuildException {
- //static final long serialVersionUID = -8034897190740066939L;
+ static final long serialVersionUID = -8034897190740066934L;
/**
Constructure function
diff --git a/Tools/Source/GenBuild/org/tianocore/build/global/SurfaceAreaQuery.java b/Tools/Source/GenBuild/org/tianocore/build/global/SurfaceAreaQuery.java index 2d8abc3b1c..ba27de2f0a 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/global/SurfaceAreaQuery.java +++ b/Tools/Source/GenBuild/org/tianocore/build/global/SurfaceAreaQuery.java @@ -567,7 +567,11 @@ public class SurfaceAreaQuery { if (returns == null) {
return new PackageIdentification[0];
}
- PackageIdentification[] packageIdList = new PackageIdentification[returns.length];
+
+ //
+ // Get packageIdentification
+ //
+ List<PackageIdentification> packageIdList = new ArrayList<PackageIdentification>();
for (int i = 0; i < returns.length; i++) {
PackageDependenciesDocument.PackageDependencies.Package item = (PackageDependenciesDocument.PackageDependencies.Package) returns[i];
@SuppressWarnings("unchecked")
@@ -575,11 +579,19 @@ public class SurfaceAreaQuery { if (arch == null || archList == null || archList.contains(arch)) {
packageGuid = item.getPackageGuid();
packageVersion = item.getPackageVersion();
- packageIdList[i] = (new PackageIdentification(null, packageGuid,
+ packageIdList.add(new PackageIdentification(null, packageGuid,
packageVersion));
}
}
- return packageIdList;
+
+ //
+ // transfer packageIdentification list to array.
+ //
+ PackageIdentification[] packageIdArray = new PackageIdentification[packageIdList.size()];
+ for (int i = 0; i < packageIdList.size(); i++) {
+ packageIdArray[i] = new PackageIdentification(null, packageIdList.get(i).getGuid(),packageIdList.get(i).getVersion());
+ }
+ return packageIdArray;
}
/**
diff --git a/Tools/Source/GenBuild/org/tianocore/build/toolchain/ToolChainKey.java b/Tools/Source/GenBuild/org/tianocore/build/toolchain/ToolChainKey.java index ae13190e97..60e698fab9 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/toolchain/ToolChainKey.java +++ b/Tools/Source/GenBuild/org/tianocore/build/toolchain/ToolChainKey.java @@ -27,7 +27,7 @@ import java.util.TreeMap; import org.tianocore.exception.EdkException;
public class ToolChainKey implements java.io.Serializable, Comparable<ToolChainKey> {
-
+ static final long serialVersionUID = -8034897190740066933L;
private String delimiter = "_";
public final static int keyLength = 5;
|