mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
For each structured-PCD field copied via memcpy, DscBuildData.py emits the clamp expression, '(FieldSize > 0 && FieldSize < ValueSize) ? FieldSize : ValueSize'. When ValueSize == 1 and FieldSize is unsigned, it reduces to (FieldSize > 0 && FieldSize < 1) - always-false comparison. Clang flags it under -Wtautological-overlap-compare, and because PcdValueInit builds with -Werror, autogen fails and the build aborts with 'PcdValueInit.c: error: overlapping comparisons always evaluate to false [-Werror,-Wtautological-overlap-compare]'. This is specific to Clang host. To fix it, this update changes '<' to '<=' at all five generator sites in DscBuildData.py (GenerateDefaultValueAssignFunction, GenerateInitValueFunction, GenerateCommandLineValue, GenerateModuleScopeValue, GenerateFdfValue). Behavior is unchanged: both branches copy the same byte count when FieldSize == ValueSize. GCC and MSVC builds are unaffected. Signed-off-by: Phil Noh <Phil.Noh@amd.com> |
||
|---|---|---|
| .. | ||
| AmlToC | ||
| AutoGen | ||
| BPDG | ||
| build | ||
| Capsule | ||
| Common | ||
| CommonDataClass | ||
| Ecc | ||
| Eot | ||
| FirmwareStorageFormat | ||
| FMMT | ||
| GenFds | ||
| GenPatchPcdTable | ||
| PatchPcdValue | ||
| Pkcs7Sign | ||
| Rsa2048Sha256Sign | ||
| Split | ||
| Table | ||
| TargetTool | ||
| tests/Split | ||
| Trim | ||
| UPT | ||
| Workspace | ||
| basetool_tiano_python_path_env.yaml | ||
| GNUmakefile | ||
| Makefile | ||
| sitecustomize.py | ||