]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java
Remove build warning.
[mirror_edk2.git] / Tools / Source / GenBuild / org / tianocore / build / autogen / AutoGen.java
index 3147a245389169fe68761915beac6b1d9a5c3b07..300433081dd212e3ae056197f661a98ba596435b 100644 (file)
@@ -264,29 +264,6 @@ public class AutoGen {
                // moduleType.\r
                //\r
                moduleType = SurfaceAreaQuery.getModuleType();\r
                // 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
 \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
                // 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
                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
                                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
                        } 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
                 }\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
             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 != 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
                        }\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
                        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
                        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
                                }\r
                        }\r
 \r
@@ -1155,22 +1121,6 @@ public class AutoGen {
                        fileBuffer.append(Integer.toString(entryPointCount));\r
                        fileBuffer.append(";\r\n\r\n");\r
 \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
-                       }\r
-\r
                        fileBuffer.append("EFI_STATUS\n");\r
                        fileBuffer.append("EFIAPI\r\n");\r
                        fileBuffer.append("ProcessModuleUnloadList (\r\n");\r
                        fileBuffer.append("EFI_STATUS\n");\r
                        fileBuffer.append("EFIAPI\r\n");\r
                        fileBuffer.append("ProcessModuleUnloadList (\r\n");\r