diff options
author | Sami Mujawar <sami.mujawar@arm.com> | 2019-07-09 13:35:02 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-03-29 16:53:35 +0000 |
commit | 96bb6704e036a2fb66d41d4ab95e976bcaab7a82 (patch) | |
tree | eaf8123884e821edc3bb5aa363981246467cd0ee /BaseTools/Source/Python/CommonDataClass/Exceptions.py | |
parent | 869f234140fd9b11ad9b77fd071164e4be873fb0 (diff) | |
download | edk2-96bb6704e036a2fb66d41d4ab95e976bcaab7a82.tar.gz edk2-96bb6704e036a2fb66d41d4ab95e976bcaab7a82.tar.bz2 edk2-96bb6704e036a2fb66d41d4ab95e976bcaab7a82.zip |
DynamicTablesPkg: Fix Proc node length assignment
The length field for the Processor Hierarchy node structure is
8-bit wide while the number of private resource field is 32-bit
wide. Therefore, the GetProcHierarchyNodeSize() returns the size
as a 32-bit value.
The VS2017 compiler reports 'warning C4244: '=': conversion from
'UINT32' to 'UINT8', possible loss of data' while assigning the
length field of the Processor Hierarchy node structure.
To fix this, a type cast is added. In addition, there is a check
to ensure that the Processor Hierarchy node size does not exceed
MAX_UINT8.
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Diffstat (limited to 'BaseTools/Source/Python/CommonDataClass/Exceptions.py')
0 files changed, 0 insertions, 0 deletions