From b35193b3df5becc0df33b892804999dd3dcfd130 Mon Sep 17 00:00:00 2001 From: vit9696 Date: Mon, 7 May 2018 20:50:56 +0300 Subject: [PATCH] Fix a compiler warning --- common/LZMA/LzmaCompress.c | 2 +- common/nvramparser.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/LZMA/LzmaCompress.c b/common/LZMA/LzmaCompress.c index c4411f3..2bde912 100644 --- a/common/LZMA/LzmaCompress.c +++ b/common/LZMA/LzmaCompress.c @@ -74,7 +74,7 @@ LzmaCompress( if (*DestinationSize < destLen) { - *DestinationSize = destLen; + *DestinationSize = (UINTN)destLen; return EFI_BUFFER_TOO_SMALL; } diff --git a/common/nvramparser.cpp b/common/nvramparser.cpp index aafd160..80a28c8 100644 --- a/common/nvramparser.cpp +++ b/common/nvramparser.cpp @@ -1401,7 +1401,7 @@ USTATUS NvramParser::parseVssStoreBody(const UModelIndex & index, UINT8 alignmen UINT8 subtype = 0; UString name; UString text; - EFI_GUID* variableGuid; + EFI_GUID* variableGuid = NULL; CHAR16* variableName = (CHAR16*)L""; UByteArray header; UByteArray body; @@ -1527,7 +1527,7 @@ USTATUS NvramParser::parseVssStoreBody(const UModelIndex & index, UINT8 alignmen UString info; // Rename invalid variables - if (isInvalid) { + if (isInvalid || !variableGuid) { name = UString("Invalid"); } else { // Add GUID and text for valid variables