Fix warnings spotted by GCC

This commit is contained in:
Nikolaj Schlej 2022-11-05 11:03:50 +01:00 committed by GitHub
parent 497fb2a86f
commit 71a7336730
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -378,7 +378,7 @@ USTATUS FfsParser::parseIntelImage(const UByteArray & intelImage, const UINT32 l
if (regionSection->MeLimit) { if (regionSection->MeLimit) {
me.offset = calculateRegionOffset(regionSection->MeBase); me.offset = calculateRegionOffset(regionSection->MeBase);
me.length = calculateRegionSize(regionSection->MeBase, regionSection->MeLimit); me.length = calculateRegionSize(regionSection->MeBase, regionSection->MeLimit);
if (intelImage.size() < me.offset + me.length) { if ((UINT32)intelImage.size() < me.offset + me.length) {
msg(usprintf("%s: ", __FUNCTION__) msg(usprintf("%s: ", __FUNCTION__)
+ itemSubtypeToUString(Types::Region, me.type) + itemSubtypeToUString(Types::Region, me.type)
+ UString(" region is located outside of the opened image. If your system uses dual-chip storage, please append another part to the opened image"), + UString(" region is located outside of the opened image. If your system uses dual-chip storage, please append another part to the opened image"),
@ -407,7 +407,7 @@ USTATUS FfsParser::parseIntelImage(const UByteArray & intelImage, const UINT32 l
bios.length = (UINT32)intelImage.size() - bios.offset; bios.length = (UINT32)intelImage.size() - bios.offset;
} }
if (intelImage.size() < bios.offset + bios.length) { if ((UINT32)intelImage.size() < bios.offset + bios.length) {
msg(usprintf("%s: ", __FUNCTION__) msg(usprintf("%s: ", __FUNCTION__)
+ itemSubtypeToUString(Types::Region, bios.type) + itemSubtypeToUString(Types::Region, bios.type)
+ UString(" region is located outside of the opened image. If your system uses dual-chip storage, please append another part to the opened image"), + UString(" region is located outside of the opened image. If your system uses dual-chip storage, please append another part to the opened image"),
@ -435,7 +435,7 @@ USTATUS FfsParser::parseIntelImage(const UByteArray & intelImage, const UINT32 l
region.offset = calculateRegionOffset(*RegionBase); region.offset = calculateRegionOffset(*RegionBase);
region.length = calculateRegionSize(*RegionBase, *RegionLimit); region.length = calculateRegionSize(*RegionBase, *RegionLimit);
if (region.length != 0) { if (region.length != 0) {
if (intelImage.size() < region.offset + region.length) { if ((UINT32)intelImage.size() < region.offset + region.length) {
msg(usprintf("%s: ", __FUNCTION__) msg(usprintf("%s: ", __FUNCTION__)
+ itemSubtypeToUString(Types::Region, region.type) + itemSubtypeToUString(Types::Region, region.type)
+ UString(" region is located outside of the opened image. If your system uses dual-chip storage, please append another part to the opened image"), + UString(" region is located outside of the opened image. If your system uses dual-chip storage, please append another part to the opened image"),