]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Remove the redundant code
authorYonghong Zhu <yonghong.zhu@intel.com>
Wed, 9 May 2018 08:41:28 +0000 (16:41 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Thu, 10 May 2018 00:38:15 +0000 (08:38 +0800)
the ArraySize and Array already be got in line 1093, so this code are
redundant.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
BaseTools/Source/Python/AutoGen/GenC.py

index 6192e86753c32129ae75aea9aa79bc7339b3cc2a..40a343ca1057eb5e7b037505e628bd147ed36103 100644 (file)
@@ -1098,16 +1098,6 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd):
         elif Pcd.Type != TAB_PCDS_FIXED_AT_BUILD and Pcd.DatumType in TAB_PCD_NUMERIC_TYPES_VOID:\r
             Value = "((%s)%s)" % (Pcd.DatumType, Value)\r
 \r
-        if Pcd.DatumType not in TAB_PCD_NUMERIC_TYPES_VOID:\r
-            # handle structure PCD\r
-            if Pcd.MaxDatumSize is None or Pcd.MaxDatumSize == '':\r
-                EdkLogger.error("build", AUTOGEN_ERROR,\r
-                                "Unknown [MaxDatumSize] of PCD [%s.%s]" % (Pcd.TokenSpaceGuidCName, TokenCName),\r
-                                ExtraData="[%s]" % str(Info))\r
-\r
-            ArraySize = int(Pcd.MaxDatumSize, 0)\r
-            Array = '[%d]' % ArraySize\r
-\r
         if Pcd.Type == TAB_PCDS_PATCHABLE_IN_MODULE:\r
             PcdValueName = '_PCD_PATCHABLE_VALUE_' + TokenCName\r
         else:\r