The VS2017 compiler reports 'warning C4244: '=': conversion from 'const UINT32' to 'UINT8', possible loss of data' when the ACPI table revision field is being updated.
The width of the revision field in the EFI_ACPI_DESCRIPTION_HEADER struct is 8-bit wide. Therefore, to fix the above warning make the ACPI Table revision field usage 8-bit wide across Dynamic Tables Framework. Signed-off-by: Sami Mujawar <sami.muja...@arm.com> --- DynamicTablesPkg/Include/AcpiTableGenerator.h | 4 ++-- DynamicTablesPkg/Include/StandardNameSpaceObjects.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DynamicTablesPkg/Include/AcpiTableGenerator.h b/DynamicTablesPkg/Include/AcpiTableGenerator.h index 7d6d3442276db7b4abaeb3b053ba489258adea0b..d7a1209c4d40c2e6ffb3dac786c276a30d70b6df 100644 --- a/DynamicTablesPkg/Include/AcpiTableGenerator.h +++ b/DynamicTablesPkg/Include/AcpiTableGenerator.h @@ -284,10 +284,10 @@ typedef struct AcpiTableGenerator { UINT32 AcpiTableSignature; /// The ACPI table revision. - UINT32 AcpiTableRevision; + UINT8 AcpiTableRevision; /// The minimum supported ACPI table revision. - UINT32 MinAcpiTableRevision; + UINT8 MinAcpiTableRevision; /// The ACPI table creator ID. UINT32 CreatorId; diff --git a/DynamicTablesPkg/Include/StandardNameSpaceObjects.h b/DynamicTablesPkg/Include/StandardNameSpaceObjects.h index 21bb7de4044ffd6f97156f761e30fc1790f11c0c..0ba6b163691ea127ae7a7d57fb5f9fdf84789338 100644 --- a/DynamicTablesPkg/Include/StandardNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/StandardNameSpaceObjects.h @@ -79,7 +79,7 @@ typedef struct CmAStdObjAcpiTableInfo { UINT32 AcpiTableSignature; /// The ACPI table revision - UINT32 AcpiTableRevision; + UINT8 AcpiTableRevision; /// The ACPI Table Generator ID ACPI_TABLE_GENERATOR_ID TableGeneratorId; -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#46269): https://edk2.groups.io/g/devel/message/46269 Mute This Topic: https://groups.io/mt/32999787/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-