From 0a2f1150568e7dae041bdae202cbe7cd17d31868 Mon Sep 17 00:00:00 2001 From: vit9696 Date: Thu, 12 Jul 2018 22:56:51 +0300 Subject: [PATCH] Fix some warnings --- UEFITool/uefitool.cpp | 4 ++-- common/ffsparser.cpp | 6 +++--- common/utility.cpp | 2 +- common/utility.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/UEFITool/uefitool.cpp b/UEFITool/uefitool.cpp index 9dd915f..1eacd17 100644 --- a/UEFITool/uefitool.cpp +++ b/UEFITool/uefitool.cpp @@ -598,7 +598,7 @@ void UEFITool::extract(const UINT8 mode) QByteArray extracted; QString name; - UINT8 result = ffsOps->extract(index, name, extracted, mode); + USTATUS result = ffsOps->extract(index, name, extracted, mode); if (result) { QMessageBox::critical(this, tr("Extraction failed"), errorCodeToUString(result), QMessageBox::Ok); return; @@ -820,7 +820,7 @@ void UEFITool::openImageFile(QString path) setWindowTitle(tr("UEFITool %1 - %2").arg(version).arg(fileInfo.fileName())); // Parse the image - UINT8 result = ffsParser->parse(buffer); + USTATUS result = ffsParser->parse(buffer); showParserMessages(); if (result) { QMessageBox::critical(this, tr("Image parsing failed"), errorCodeToUString(result), QMessageBox::Ok); diff --git a/common/ffsparser.cpp b/common/ffsparser.cpp index 3170579..157f485 100644 --- a/common/ffsparser.cpp +++ b/common/ffsparser.cpp @@ -572,8 +572,8 @@ USTATUS FfsParser::parseIntelImage(const UByteArray & intelImage, const UINT32 l UModelIndex regionIndex = model->addItem(model->offset(parent) + localOffset, Types::Region, Subtypes::DescriptorRegion, name, UString(), info, UByteArray(), body, UByteArray(), Fixed, index); // Parse regions - UINT8 result = U_SUCCESS; - UINT8 parseResult = U_SUCCESS; + USTATUS result = U_SUCCESS; + USTATUS parseResult = U_SUCCESS; for (size_t i = 0; i < regions.size(); i++) { region = regions[i]; switch (region.type) { @@ -732,7 +732,7 @@ USTATUS FfsParser::parsePdrRegion(const UByteArray & pdr, const UINT32 localOffs index = model->addItem(model->offset(parent) + localOffset, Types::Region, Subtypes::PdrRegion, name, UString(), info, UByteArray(), pdr, UByteArray(), Fixed, parent); // Parse PDR region as BIOS space - UINT8 result = parseRawArea(index); + USTATUS result = parseRawArea(index); if (result && result != U_VOLUMES_NOT_FOUND && result != U_INVALID_VOLUME) return result; diff --git a/common/utility.cpp b/common/utility.cpp index 0cbccb0..2c07879 100644 --- a/common/utility.cpp +++ b/common/utility.cpp @@ -75,7 +75,7 @@ UString uniqueItemName(const UModelIndex & index) } // Returns text representation of error code -UString errorCodeToUString(UINT8 errorCode) +UString errorCodeToUString(USTATUS errorCode) { switch (errorCode) { case U_SUCCESS: return UString("Success"); diff --git a/common/utility.h b/common/utility.h index 6cfb9bf..792bca8 100644 --- a/common/utility.h +++ b/common/utility.h @@ -23,7 +23,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. UString uniqueItemName(const UModelIndex & index); // Converts error code to UString -UString errorCodeToUString(UINT8 errorCode); +UString errorCodeToUString(USTATUS errorCode); // Decompression routine USTATUS decompress(const UByteArray & compressed, const UINT8 compressionType, UINT8 & algorithm, UByteArray & decompressed, UByteArray & efiDecompressed);