summaryrefslogtreecommitdiffstats
path: root/DynamicTablesPkg
diff options
context:
space:
mode:
authorOliver Smith-Denny <osde@microsoft.com>2024-01-31 13:52:26 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-10-07 07:33:52 +0000
commit596773f5e33ec03968b8e8621ff4958b3eeaf412 (patch)
tree9c7b485e0986c2ee5a85bc6c107bd715702cc7c8 /DynamicTablesPkg
parent80d9b4449182cd17484cae72269992e642095a00 (diff)
downloadedk2-596773f5e33ec03968b8e8621ff4958b3eeaf412.tar.gz
edk2-596773f5e33ec03968b8e8621ff4958b3eeaf412.tar.bz2
edk2-596773f5e33ec03968b8e8621ff4958b3eeaf412.zip
DynamicTablesPkg: AmlLib: Fix CodeQL Issue
Without the addition of this cast, the compiler promotes 1 to a UINT32, which leads CodeQL to complain that different size types are being compared. Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
Diffstat (limited to 'DynamicTablesPkg')
-rw-r--r--DynamicTablesPkg/Library/Common/AmlLib/AmlEncoding/Aml.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/DynamicTablesPkg/Library/Common/AmlLib/AmlEncoding/Aml.c b/DynamicTablesPkg/Library/Common/AmlLib/AmlEncoding/Aml.c
index e46dc6c1f1..c67066d28e 100644
--- a/DynamicTablesPkg/Library/Common/AmlLib/AmlEncoding/Aml.c
+++ b/DynamicTablesPkg/Library/Common/AmlLib/AmlEncoding/Aml.c
@@ -774,7 +774,7 @@ AmlSetPkgLength (
// Write to the Buffer.
*Buffer = LeadByte;
CurrentOffset = 1;
- while (CurrentOffset < (Offset + 1)) {
+ while (CurrentOffset < (Offset + (UINT8)1)) {
CurrentShift = (UINT8)((CurrentOffset - 1) * 8);
ComputedLength = Length & (UINT32)(0x00000FF0 << CurrentShift);
ComputedLength = (ComputedLength) >> (4 + CurrentShift);