Remove build warning.
authorqouyang <qouyang@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 7 Jul 2006 01:53:47 +0000 (01:53 +0000)
committerqouyang <qouyang@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 7 Jul 2006 01:53:47 +0000 (01:53 +0000)
Fixed bug:
EdkT81,
EdkT83,
EdkT77,
EdkT84.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@810 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java
Tools/Source/GenBuild/org/tianocore/build/exception/AutoGenException.java
Tools/Source/GenBuild/org/tianocore/build/exception/EdkException.java
Tools/Source/GenBuild/org/tianocore/build/exception/GenBuildException.java
Tools/Source/GenBuild/org/tianocore/build/exception/PcdAutogenException.java
Tools/Source/GenBuild/org/tianocore/build/exception/TianoToolsException.java
Tools/Source/GenBuild/org/tianocore/build/exception/XmlParseException.java
Tools/Source/GenBuild/org/tianocore/build/global/SurfaceAreaQuery.java
Tools/Source/GenBuild/org/tianocore/build/toolchain/ToolChainKey.java

index 3147a245389169fe68761915beac6b1d9a5c3b07..300433081dd212e3ae056197f661a98ba596435b 100644 (file)
@@ -264,29 +264,6 @@ public class AutoGen {
                // moduleType.\r
                //\r
                moduleType = SurfaceAreaQuery.getModuleType();\r
-//             switch (CommonDefinition.getModuleType(moduleType)) {\r
-//             case CommonDefinition.ModuleTypeDxeCore:\r
-//             case CommonDefinition.ModuleTypeDxeDriver:\r
-//             case CommonDefinition.ModuleTypeDxeRuntimeDriver:\r
-//             case CommonDefinition.ModuleTypeDxeSmmDriver:\r
-//             case CommonDefinition.ModuleTypeDxeSalDriver:\r
-//             case CommonDefinition.ModuleTypeUefiDriver:\r
-//             case CommonDefinition.ModuleTypeUefiApplication:\r
-//                     fileBuffer.append(CommonDefinition.autoGenHLine1);\r
-//                     break;\r
-//             default:\r
-//                     fileBuffer.append(CommonDefinition.autoGenHVersionDefault);\r
-//                     break;\r
-//             }\r
-//             switch (CommonDefinition.getModuleType(moduleType)) {\r
-//             case CommonDefinition.ModuleTypeUefiDriver:\r
-//             case CommonDefinition.ModuleTypeUefiApplication:\r
-//                     fileBuffer.append(CommonDefinition.autoGenHReleaseDefault);\r
-//                     break;\r
-//             default:\r
-//                     fileBuffer.append(CommonDefinition.autoGenHLine2);\r
-//                     break;\r
-//             }\r
 \r
                //\r
                // Add "extern int __make_me_compile_correctly;" at begin of\r
@@ -308,7 +285,7 @@ public class AutoGen {
                // PackageIdentification[] consumedPkgIdList = SurfaceAreaQuery\r
                // .getDependencePkg(this.arch);\r
                PackageIdentification[] consumedPkgIdList = SurfaceAreaQuery\r
-                               .getDependencePkg(null);\r
+                               .getDependencePkg(this.arch);\r
                if (consumedPkgIdList != null) {\r
                        headerFileList = depPkgToAutogenH(consumedPkgIdList, moduleType);\r
                        item = headerFileList.iterator();\r
@@ -891,21 +868,17 @@ public class AutoGen {
                                fileBuffer.append("{\r\n");\r
                                fileBuffer.append("  return EFI_SUCCESS;\r\n");\r
                                fileBuffer.append("}\r\n\r\n");\r
-                               break;\r
+\r
                        } else {\r
                 for (int i = 0; i < entryPointList.length; i++) {\r
-                    if (!entryPointList[i].equals("")) {\r
-                        fileBuffer.append("EFI_STATUS\r\n");\r
-                        fileBuffer.append("EFIAPI\r\n");\r
-                        fileBuffer.append(entryPointList[i]);\r
-                        fileBuffer.append(" (\r\n");\r
-                        fileBuffer.append("  IN EFI_HANDLE        ImageHandle,\r\n");\r
-                        fileBuffer.append("  IN EFI_SYSTEM_TABLE  *SystemTable\r\n");\r
-                        fileBuffer.append("  );\r\n");\r
-                        entryPointCount++;\r
-                    } else {\r
-                        break;\r
-                    }\r
+                    fileBuffer.append("EFI_STATUS\r\n");\r
+                    fileBuffer.append("EFIAPI\r\n");\r
+                    fileBuffer.append(entryPointList[i]);\r
+                    fileBuffer.append(" (\r\n");\r
+                    fileBuffer.append("  IN EFI_HANDLE        ImageHandle,\r\n");\r
+                    fileBuffer.append("  IN EFI_SYSTEM_TABLE  *SystemTable\r\n");\r
+                    fileBuffer.append("  );\r\n");\r
+                    entryPointCount++;\r
                 }\r
                 fileBuffer\r
                         .append("GLOBAL_REMOVE_IF_UNREFERENCED  const UINT8  _gDriverEntryPointCount = ");\r
@@ -962,27 +935,24 @@ public class AutoGen {
             entryPointList = CommonDefinition.remDupString(entryPointList);\r
                        entryPointCount = 0;\r
 \r
-                       fileBuffer\r
-                                       .append("GLOBAL_REMOVE_IF_UNREFERENCED const UINT8  _gDriverUnloadImageCount = ");\r
-                       fileBuffer.append(Integer.toString(entryPointCount));\r
-                       fileBuffer.append(";\r\n\r\n");\r
-\r
                        if (entryPointList != null) {\r
                                for (int i = 0; i < entryPointList.length; i++) {\r
-                                       if (!entryPointList[i].equals("")) {\r
-                                               fileBuffer.append("EFI_STATUS\r\n");\r
-                                               fileBuffer.append("EFIAPI\r\n");\r
-                                               fileBuffer.append(entryPointList[i]);\r
-                                               fileBuffer.append(" (\r\n");\r
-                                               fileBuffer\r
-                                                               .append("  IN EFI_HANDLE        ImageHandle\r\n");\r
-                                               fileBuffer.append("  );\r\n");\r
-                                       } else {\r
-                                               break;\r
-                                       }\r
-                               }\r
+                    fileBuffer.append("EFI_STATUS\r\n");\r
+                    fileBuffer.append("EFIAPI\r\n");\r
+                    fileBuffer.append(entryPointList[i]);\r
+                    fileBuffer.append(" (\r\n");\r
+                    fileBuffer\r
+                            .append("  IN EFI_HANDLE        ImageHandle\r\n");\r
+                    fileBuffer.append("  );\r\n");\r
+                    entryPointCount++;\r
+                }\r
                        }\r
 \r
+            fileBuffer\r
+                                       .append("GLOBAL_REMOVE_IF_UNREFERENCED const UINT8  _gDriverUnloadImageCount = ");\r
+                       fileBuffer.append(Integer.toString(entryPointCount));\r
+                       fileBuffer.append(";\r\n\r\n");\r
+\r
                        fileBuffer.append("EFI_STATUS\r\n");\r
                        fileBuffer.append("EFIAPI\r\n");\r
                        fileBuffer.append("ProcessModuleUnloadList (\r\n");\r
@@ -1135,18 +1105,14 @@ public class AutoGen {
                        entryPointCount = 0;\r
                        if (entryPointList != null) {\r
                                for (int i = 0; i < entryPointList.length; i++) {\r
-                                       if (!entryPointList[i].equals("")) {\r
-                                               fileBuffer.append("EFI_STATUS\r\n");\r
-                                               fileBuffer.append("EFIAPI\r\n");\r
-                                               fileBuffer.append(entryPointList[i]);\r
-                                               fileBuffer.append(" (\r\n");\r
-                                               fileBuffer\r
-                                                               .append("  IN EFI_HANDLE        ImageHandle\r\n");\r
-                                               fileBuffer.append("  );\r\n");\r
-                                               entryPointCount++;\r
-                                       } else {\r
-                                               break;\r
-                                       }\r
+                    fileBuffer.append("EFI_STATUS\r\n");\r
+                    fileBuffer.append("EFIAPI\r\n");\r
+                    fileBuffer.append(entryPointList[i]);\r
+                    fileBuffer.append(" (\r\n");\r
+                    fileBuffer\r
+                            .append("  IN EFI_HANDLE        ImageHandle\r\n");\r
+                    fileBuffer.append("  );\r\n");\r
+                    entryPointCount++;\r
                                }\r
                        }\r
 \r
@@ -1155,22 +1121,6 @@ public class AutoGen {
                        fileBuffer.append(Integer.toString(entryPointCount));\r
                        fileBuffer.append(";\r\n\r\n");\r
 \r
-                       if (entryPointList != null) {\r
-                               for (int i = 0; i < entryPointList.length; i++) {\r
-                                       if (!entryPointList[i].equals("")) {\r
-                                               fileBuffer.append("EFI_STATUS\r\n");\r
-                                               fileBuffer.append("EFIAPI\r\n");\r
-                                               fileBuffer.append(entryPointList[i]);\r
-                                               fileBuffer.append(" (\r\n");\r
-                                               fileBuffer\r
-                                                               .append("  IN EFI_HANDLE        ImageHandle\r\n");\r
-                                               fileBuffer.append("  );\r\n");\r
-                                       } else {\r
-                                               break;\r
-                                       }\r
-                               }\r
-                       }\r
-\r
                        fileBuffer.append("EFI_STATUS\n");\r
                        fileBuffer.append("EFIAPI\r\n");\r
                        fileBuffer.append("ProcessModuleUnloadList (\r\n");\r
index 0faf6c7113d582ade93168abf344ad9d310c0010..fb6a9c2fe1a6596406fdd2933dbf4b9455618ece 100644 (file)
@@ -20,7 +20,7 @@ package org.tianocore.build.exception;
   The class handle the exception throwed by entity class.\r
 **/\r
 public class AutoGenException extends GenBuildException {\r
-    //static final long serialVersionUID = -8034897190740066939L;\r
+    static final long serialVersionUID = -8034897190740066939L;\r
     /**\r
       Constructure function\r
         \r
index 8be839bb487af54a09b549294aca0480bc29c88c..086ecd88657a938a006a17db17db76e006c27a9f 100644 (file)
@@ -19,7 +19,7 @@ package org.tianocore.build.exception;
   The class handle the exception throwed by entity class.\r
 **/\r
 public class EdkException extends Exception {\r
-    //static final long serialVersionUID = -8034897190740066939L;\r
+    static final long serialVersionUID = -8034897190740066938L;\r
     /**\r
       Constructure function\r
         \r
index 7ae058059197b3a4fe3d5012f1a828e724f6e8c9..51e0bd1f89ec117faec46029af8ca6a411c68970 100644 (file)
@@ -21,7 +21,7 @@ import org.tianocore.exception.EdkException;
   The class handle the exception throwed by entity class.\r
 **/\r
 public class GenBuildException extends EdkException {\r
-    //static final long serialVersionUID = -8034897190740066939L;\r
+    static final long serialVersionUID = -8034897190740066937L;\r
     /**\r
       Constructure function\r
         \r
index 49d5543e116405a95ca6c1742677475dbf12a531..d11e041695584b0f699cd6a99f188c2349886c8d 100644 (file)
@@ -19,7 +19,7 @@ package org.tianocore.build.exception;
   The class handle the exception throwed by entity class.\r
 **/\r
 public class PcdAutogenException extends AutoGenException {\r
-    //static final long serialVersionUID = -8034897190740066939L;\r
+    static final long serialVersionUID = -8034897190740066936L;\r
     /**\r
       Constructure function\r
         \r
index 2daa8716b235be1c787e858deb731b3d8a29cbf3..87505e49b1ca676fd9647e8f3b87d57272502f10 100644 (file)
@@ -21,7 +21,7 @@ import org.tianocore.exception.EdkException;
   The class handle the exception throwed by entity class.\r
 **/\r
 public class TianoToolsException extends EdkException {\r
-    //static final long serialVersionUID = -8034897190740066939L;\r
+    static final long serialVersionUID = -8034897190740066935L;\r
     /**\r
       Constructure function\r
         \r
index afa92f4598a44e3a733d7134e85d5f76ba8263b5..0ba1a787aaac814d8332efd43d0a26522493a850 100644 (file)
@@ -19,7 +19,7 @@ package org.tianocore.build.exception;
   The class handle the exception throwed by entity class.\r
 **/\r
 public class XmlParseException extends GenBuildException {\r
-    //static final long serialVersionUID = -8034897190740066939L;\r
+    static final long serialVersionUID = -8034897190740066934L;\r
     /**\r
       Constructure function\r
         \r
index 2d8abc3b1c71f698bba164311823df826456ef85..ba27de2f0ad7662298e04cfb7e74dec861f36208 100644 (file)
@@ -567,7 +567,11 @@ public class SurfaceAreaQuery {
         if (returns == null) {\r
             return new PackageIdentification[0];\r
         }\r
-        PackageIdentification[] packageIdList = new PackageIdentification[returns.length];\r
+\r
+        //\r
+        //  Get packageIdentification \r
+        // \r
+        List<PackageIdentification> packageIdList = new ArrayList<PackageIdentification>();\r
         for (int i = 0; i < returns.length; i++) {\r
             PackageDependenciesDocument.PackageDependencies.Package item = (PackageDependenciesDocument.PackageDependencies.Package) returns[i];\r
             @SuppressWarnings("unchecked")\r
@@ -575,11 +579,19 @@ public class SurfaceAreaQuery {
             if (arch == null || archList == null || archList.contains(arch)) {\r
                 packageGuid = item.getPackageGuid();\r
                 packageVersion = item.getPackageVersion();\r
-                packageIdList[i] = (new PackageIdentification(null, packageGuid,\r
+                packageIdList.add(new PackageIdentification(null, packageGuid,\r
                     packageVersion));\r
             }\r
         }\r
-        return packageIdList;\r
+\r
+        //\r
+        //  transfer packageIdentification list to array.\r
+        // \r
+        PackageIdentification[] packageIdArray = new PackageIdentification[packageIdList.size()];\r
+        for (int i = 0; i < packageIdList.size(); i++) {\r
+            packageIdArray[i] = new PackageIdentification(null, packageIdList.get(i).getGuid(),packageIdList.get(i).getVersion());\r
+        }\r
+        return packageIdArray;\r
     }\r
 \r
     /**\r
index ae13190e9790e14fb9e25620729d035825cfd074..60e698fab9252d677b16fe0049560821033bad5b 100644 (file)
@@ -27,7 +27,7 @@ import java.util.TreeMap;
 import org.tianocore.exception.EdkException;\r
 \r
 public class ToolChainKey implements java.io.Serializable, Comparable<ToolChainKey> {\r
-\r
+    static final long serialVersionUID = -8034897190740066933L;\r
     private String delimiter = "_";\r
 \r
     public final static int keyLength = 5;\r