From 71a7336730c670258c2ad4d4a8620e0d61eb8929 Mon Sep 17 00:00:00 2001 From: Nikolaj Schlej Date: Sat, 5 Nov 2022 11:03:50 +0100 Subject: [PATCH] Fix warnings spotted by GCC --- common/ffsparser.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/ffsparser.cpp b/common/ffsparser.cpp index 7d5ffb9..bd79cd1 100644 --- a/common/ffsparser.cpp +++ b/common/ffsparser.cpp @@ -378,7 +378,7 @@ USTATUS FfsParser::parseIntelImage(const UByteArray & intelImage, const UINT32 l if (regionSection->MeLimit) { me.offset = calculateRegionOffset(regionSection->MeBase); 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__) + 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"), @@ -407,7 +407,7 @@ USTATUS FfsParser::parseIntelImage(const UByteArray & intelImage, const UINT32 l 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__) + 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"), @@ -435,7 +435,7 @@ USTATUS FfsParser::parseIntelImage(const UByteArray & intelImage, const UINT32 l region.offset = calculateRegionOffset(*RegionBase); region.length = calculateRegionSize(*RegionBase, *RegionLimit); if (region.length != 0) { - if (intelImage.size() < region.offset + region.length) { + if ((UINT32)intelImage.size() < region.offset + region.length) { msg(usprintf("%s: ", __FUNCTION__) + 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"),