From 6c96a243d31f697e76dcd1e4f5b2bc208d3a6093 Mon Sep 17 00:00:00 2001 From: Nikolaj Schlej Date: Fri, 24 Jan 2014 13:29:21 +0100 Subject: [PATCH] Version 0.16.5.1 Small changes after using cppcheck --- LZMA/SDK/C/LzmaEnc.c | 2 +- ffs.cpp | 2 +- ffs.h | 2 +- ffsengine.cpp | 3 +-- uefitool.cpp | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/LZMA/SDK/C/LzmaEnc.c b/LZMA/SDK/C/LzmaEnc.c index 3caff35..b407f94 100644 --- a/LZMA/SDK/C/LzmaEnc.c +++ b/LZMA/SDK/C/LzmaEnc.c @@ -2078,7 +2078,7 @@ void LzmaEnc_Finish(CLzmaEncHandle pp) if (p->mtMode) MatchFinderMt_ReleaseStream(&p->matchFinderMt); #else - pp = pp; + //pp = pp; #endif } diff --git a/ffs.cpp b/ffs.cpp index f9a1ec4..a47966b 100644 --- a/ffs.cpp +++ b/ffs.cpp @@ -60,7 +60,7 @@ UINT32 uint24ToUint32(UINT8* ffsSize) ffsSize[0]; } -QString guidToQString(const EFI_GUID guid) +QString guidToQString(const EFI_GUID& guid) { QByteArray baGuid = QByteArray::fromRawData((const char*) guid.Data, sizeof(EFI_GUID)); UINT32 i32 = *(UINT32*)baGuid.left(4).constData(); diff --git a/ffs.h b/ffs.h index 56455c7..b0e5613 100644 --- a/ffs.h +++ b/ffs.h @@ -19,7 +19,7 @@ WITHWARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // C++ functions // GUID to QString routine -extern QString guidToQString(const EFI_GUID guid); +extern QString guidToQString(const EFI_GUID& guid); // File type to QString routine extern QString fileTypeToQString(const UINT8 type); // Section type to QString routine diff --git a/ffsengine.cpp b/ffsengine.cpp index 0d4756f..557e633 100644 --- a/ffsengine.cpp +++ b/ffsengine.cpp @@ -369,14 +369,13 @@ UINT8 FfsEngine::parseMeRegion(const QByteArray & me, QModelIndex & index, const QString info = tr("Size: %1"). arg(me.size(), 8, 16, QChar('0')); - ME_VERSION* version; INT32 versionOffset = me.indexOf(ME_VERSION_SIGNATURE); if (versionOffset < 0){ info += tr("\nVersion: unknown"); msg(tr("parseRegion: ME region version is unknown, it can be damaged"), parent); } else { - version = (ME_VERSION*) (me.constData() + versionOffset); + ME_VERSION* version = (ME_VERSION*) (me.constData() + versionOffset); info += tr("\nVersion: %1.%2.%3.%4") .arg(version->major) .arg(version->minor) diff --git a/uefitool.cpp b/uefitool.cpp index d84c1ee..568ec80 100644 --- a/uefitool.cpp +++ b/uefitool.cpp @@ -531,7 +531,7 @@ void UEFITool::showMessages() void UEFITool::scrollTreeView(QListWidgetItem* item) { - MessageListItem* messageItem = (MessageListItem*) item; + MessageListItem* messageItem = static_cast(item); QModelIndex index = messageItem->index(); if (index.isValid()) { ui->structureTreeView->scrollTo(index);