From 12fe8bf29c0405bf99eb05f7958234c20c646142 Mon Sep 17 00:00:00 2001 From: Nikolaj Schlej Date: Sat, 12 Dec 2015 21:05:53 +0100 Subject: [PATCH] Fix a warning spotted by clang - signed int compared to unsigned --- common/ffsparser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/ffsparser.cpp b/common/ffsparser.cpp index 595e9aa..47b0103 100644 --- a/common/ffsparser.cpp +++ b/common/ffsparser.cpp @@ -1309,10 +1309,10 @@ STATUS FfsParser::parseVolumeNonUefiData(const QByteArray & data, const UINT32 p padding = data.left(vtfIndex); vtf = data.mid(vtfIndex); const EFI_FFS_FILE_HEADER* fileHeader = (const EFI_FFS_FILE_HEADER*)vtf.constData(); - if (vtf.size() < sizeof(EFI_FFS_FILE_HEADER) // VTF candidate is too small to be a real VTF in FFSv1/v2 volume + if ((UINT32)vtf.size() < sizeof(EFI_FFS_FILE_HEADER) // VTF candidate is too small to be a real VTF in FFSv1/v2 volume || (pdata.ffsVersion == 3 && (fileHeader->Attributes & FFS_ATTRIB_LARGE_FILE) - && vtf.size() < sizeof(EFI_FFS_FILE_HEADER2))) { // VTF candidate is too small to be a real VTF in FFSv3 volume + && (UINT32)vtf.size() < sizeof(EFI_FFS_FILE_HEADER2))) { // VTF candidate is too small to be a real VTF in FFSv3 volume vtfIndex = -1; padding = data; vtf.clear();