mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
IntelFsp2Pkg/CacheLib: Make integer width consistent in loop condition
Explicitly casts `mFixedMtrrTable[MsrNum].Length` to resolve a `comparison-with-wider-type` CodeQL error. https://codeql.github.com/codeql-query-help/cpp/cpp-comparison-with-wider-type/ Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
This commit is contained in:
parent
8cb24514e2
commit
ee6a2bfc2c
1 changed files with 1 additions and 1 deletions
|
|
@ -328,7 +328,7 @@ ProgramFixedMtrr (
|
|||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
for ( ; ((ByteShift < 8) && (*Len >= mFixedMtrrTable[MsrNum].Length)); ByteShift++) {
|
||||
for ( ; ((ByteShift < 8) && (*Len >= (UINT64)mFixedMtrrTable[MsrNum].Length)); ByteShift++) {
|
||||
OrMask |= LShiftU64 ((UINT64)MemoryCacheType, (UINT32)(ByteShift* 8));
|
||||
ClearMask |= LShiftU64 ((UINT64)0xFF, (UINT32)(ByteShift * 8));
|
||||
*Len -= mFixedMtrrTable[MsrNum].Length;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue