Fix cast warnings

This commit is contained in:
vit9696 2021-10-07 19:02:11 +03:00
parent 44bb6e8261
commit 2a083d8739
3 changed files with 8 additions and 8 deletions

View File

@ -3374,11 +3374,11 @@ USTATUS FfsParser::addInfoRecursive(const UModelIndex & index)
if (address <= 0xFFFFFFFFUL) {
UINT32 headerSize = (UINT32)model->header(index).size();
if (headerSize) {
model->addInfo(index, usprintf("Data address: %08llXh\n", address + headerSize),false);
model->addInfo(index, usprintf("Header address: %08llXh\n", address), false);
model->addInfo(index, usprintf("Data address: %08llXh\n", (unsigned long long)address + headerSize),false);
model->addInfo(index, usprintf("Header address: %08llXh\n", (unsigned long long)address), false);
}
else {
model->addInfo(index, usprintf("Address: %08llXh\n", address), false);
model->addInfo(index, usprintf("Address: %08llXh\n", (unsigned long long)address), false);
}
}
// Add base
@ -4200,8 +4200,8 @@ USTATUS FfsParser::parseFitEntryBootGuardBootPolicy(const UByteArray & bootPolic
elementHeader->Version,
elementHeader->Unknown,
elementHeader->Flags,
elementHeader->IbbMchBar,
elementHeader->VtdBar,
(unsigned long long)elementHeader->IbbMchBar,
(unsigned long long)elementHeader->VtdBar,
elementHeader->PmrlBase,
elementHeader->PmrlLimit,
elementHeader->EntryPoint

View File

@ -333,7 +333,7 @@ USTATUS MeParser::parseIfwi16Region(const UByteArray & region, const UModelIndex
ifwiHeader->BootPartition[2].Offset, ifwiHeader->BootPartition[2].Size,
ifwiHeader->BootPartition[3].Offset, ifwiHeader->BootPartition[3].Size,
ifwiHeader->BootPartition[4].Offset, ifwiHeader->BootPartition[4].Size,
ifwiHeader->Checksum);
(unsigned long long)ifwiHeader->Checksum);
// Add tree item
index = model->addItem(0, Types::IfwiHeader, 0, name, UString(), info, UByteArray(), header, UByteArray(), Fixed, parent);

View File

@ -629,7 +629,7 @@ USTATUS NvramParser::findNextStore(const UModelIndex & index, const UByteArray &
else if (ftwHeader->WriteQueueSize % 0x10 == 0x00) { // Header with 64 bit WriteQueueSize
const EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER64* ftw64Header = (const EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER64*)currentPos;
if (ftw64Header->WriteQueueSize == 0 || ftw64Header->WriteQueueSize >= 0xFFFFFFFF) {
msg(usprintf("%s: FTW block candidate at offset %Xh skipped, has invalid body size %llXh", __FUNCTION__, localOffset + offset, ftw64Header->WriteQueueSize), index);
msg(usprintf("%s: FTW block candidate at offset %Xh skipped, has invalid body size %llXh", __FUNCTION__, localOffset + offset, (unsigned long long)ftw64Header->WriteQueueSize), index);
continue;
}
}
@ -1923,7 +1923,7 @@ USTATUS NvramParser::parseFlashMapBody(const UModelIndex & index)
"Entry type: %04Xh\nData type: %04Xh\nMemory address: %08llXh\nSize: %08Xh\nOffset: %08Xh",
entryHeader->EntryType,
entryHeader->DataType,
entryHeader->PhysicalAddress,
(unsigned long long)entryHeader->PhysicalAddress,
entryHeader->Size,
entryHeader->Offset);