BaseTools/Source/Python/AutoGen/GenC.py | 10 ---------- 1 file changed, 10 deletions(-)
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>
---
BaseTools/Source/Python/AutoGen/GenC.py | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py
index 6192e86..40a343c 100644
--- a/BaseTools/Source/Python/AutoGen/GenC.py
+++ b/BaseTools/Source/Python/AutoGen/GenC.py
@@ -1096,20 +1096,10 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd):
# Long term we need PCD macros that work in assembly
#
elif Pcd.Type != TAB_PCDS_FIXED_AT_BUILD and Pcd.DatumType in TAB_PCD_NUMERIC_TYPES_VOID:
Value = "((%s)%s)" % (Pcd.DatumType, Value)
- if Pcd.DatumType not in TAB_PCD_NUMERIC_TYPES_VOID:
- # handle structure PCD
- if Pcd.MaxDatumSize is None or Pcd.MaxDatumSize == '':
- EdkLogger.error("build", AUTOGEN_ERROR,
- "Unknown [MaxDatumSize] of PCD [%s.%s]" % (Pcd.TokenSpaceGuidCName, TokenCName),
- ExtraData="[%s]" % str(Info))
-
- ArraySize = int(Pcd.MaxDatumSize, 0)
- Array = '[%d]' % ArraySize
-
if Pcd.Type == TAB_PCDS_PATCHABLE_IN_MODULE:
PcdValueName = '_PCD_PATCHABLE_VALUE_' + TokenCName
else:
PcdValueName = '_PCD_VALUE_' + TokenCName
--
2.6.1.windows.1
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Gotta love removing code.
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Yonghong Zhu
> Sent: Wednesday, May 9, 2018 5:32 AM
> To: edk2-devel@lists.01.org
> Subject: [edk2] [Patch] BaseTools: Remove the redundant code
>
> 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>
> ---
> BaseTools/Source/Python/AutoGen/GenC.py | 10 ----------
> 1 file changed, 10 deletions(-)
>
> diff --git a/BaseTools/Source/Python/AutoGen/GenC.py
> b/BaseTools/Source/Python/AutoGen/GenC.py
> index 6192e86..40a343c 100644
> --- a/BaseTools/Source/Python/AutoGen/GenC.py
> +++ b/BaseTools/Source/Python/AutoGen/GenC.py
> @@ -1096,20 +1096,10 @@ def CreateModulePcdCode(Info, AutoGenC,
> AutoGenH, Pcd):
> # Long term we need PCD macros that work in assembly
> #
> elif Pcd.Type != TAB_PCDS_FIXED_AT_BUILD and Pcd.DatumType in
> TAB_PCD_NUMERIC_TYPES_VOID:
> Value = "((%s)%s)" % (Pcd.DatumType, Value)
>
> - if Pcd.DatumType not in TAB_PCD_NUMERIC_TYPES_VOID:
> - # handle structure PCD
> - if Pcd.MaxDatumSize is None or Pcd.MaxDatumSize == '':
> - EdkLogger.error("build", AUTOGEN_ERROR,
> - "Unknown [MaxDatumSize] of PCD [%s.%s]" %
> (Pcd.TokenSpaceGuidCName, TokenCName),
> - ExtraData="[%s]" % str(Info))
> -
> - ArraySize = int(Pcd.MaxDatumSize, 0)
> - Array = '[%d]' % ArraySize
> -
> if Pcd.Type == TAB_PCDS_PATCHABLE_IN_MODULE:
> PcdValueName = '_PCD_PATCHABLE_VALUE_' + TokenCName
> else:
> PcdValueName = '_PCD_VALUE_' + TokenCName
>
> --
> 2.6.1.windows.1
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
© 2016 - 2025 Red Hat, Inc.