mirror of
https://github.com/LongSoft/UEFITool.git
synced 2024-11-22 07:58:22 +08:00
Fix clang compilation error
- Non-const lvalue reference can’t bind to temporary object. Makes sense, but compiles by MSVC.
This commit is contained in:
parent
4cf6b4f37b
commit
645b50538a
@ -2319,12 +2319,12 @@ STATUS FfsParser::parseGuidedSectionBody(const QModelIndex & index)
|
||||
|
||||
// Check if section requires processing
|
||||
QByteArray processed = model->body(index);
|
||||
QByteArray efiDecompressed;
|
||||
QString info;
|
||||
bool parseCurrentSection = true;
|
||||
UINT8 algorithm = COMPRESSION_ALGORITHM_NONE;
|
||||
// Tiano compressed section
|
||||
if (QByteArray((const char*)&guid, sizeof(EFI_GUID)) == EFI_GUIDED_SECTION_TIANO) {
|
||||
QByteArray efiDecompressed;
|
||||
algorithm = EFI_STANDARD_COMPRESSION;
|
||||
STATUS result = decompress(model->body(index), algorithm, processed, efiDecompressed);
|
||||
if (result) {
|
||||
@ -2355,7 +2355,7 @@ STATUS FfsParser::parseGuidedSectionBody(const QModelIndex & index)
|
||||
// LZMA compressed section
|
||||
else if (QByteArray((const char*)&guid, sizeof(EFI_GUID)) == EFI_GUIDED_SECTION_LZMA) {
|
||||
algorithm = EFI_CUSTOMIZED_COMPRESSION;
|
||||
STATUS result = decompress(model->body(index), algorithm, processed);
|
||||
STATUS result = decompress(model->body(index), algorithm, processed, efiDecompressed);
|
||||
if (result) {
|
||||
parseCurrentSection = false;
|
||||
msg(tr("parseGuidedSectionBody: decompression failed with error \"%1\"").arg(errorCodeToQString(result)), index);
|
||||
|
@ -29,7 +29,7 @@ QByteArray parsingDataToQByteArray(const PARSING_DATA & pdata);
|
||||
extern QString errorCodeToQString(UINT8 errorCode);
|
||||
|
||||
// Decompression routine
|
||||
extern STATUS decompress(const QByteArray & compressed, UINT8 & algorithm, QByteArray & decompressed, QByteArray & efiDecompressed = QByteArray());
|
||||
extern STATUS decompress(const QByteArray & compressed, UINT8 & algorithm, QByteArray & decompressed, QByteArray & efiDecompressed);
|
||||
|
||||
// Compression routine
|
||||
//STATUS compress(const QByteArray & decompressed, QByteArray & compressed, const UINT8 & algorithm);
|
||||
@ -43,4 +43,4 @@ extern UINT8 calculateChecksum8(const UINT8* buffer, UINT32 bufferSize);
|
||||
// 16bit checksum calculation routine
|
||||
extern UINT16 calculateChecksum16(const UINT16* buffer, UINT32 bufferSize);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user