Version 0.16.5.1

Small changes after using cppcheck
This commit is contained in:
Nikolaj Schlej 2014-01-24 13:29:21 +01:00
parent f65bebb398
commit 6c96a243d3
5 changed files with 5 additions and 6 deletions

View File

@ -2078,7 +2078,7 @@ void LzmaEnc_Finish(CLzmaEncHandle pp)
if (p->mtMode) if (p->mtMode)
MatchFinderMt_ReleaseStream(&p->matchFinderMt); MatchFinderMt_ReleaseStream(&p->matchFinderMt);
#else #else
pp = pp; //pp = pp;
#endif #endif
} }

View File

@ -60,7 +60,7 @@ UINT32 uint24ToUint32(UINT8* ffsSize)
ffsSize[0]; 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)); QByteArray baGuid = QByteArray::fromRawData((const char*) guid.Data, sizeof(EFI_GUID));
UINT32 i32 = *(UINT32*)baGuid.left(4).constData(); UINT32 i32 = *(UINT32*)baGuid.left(4).constData();

2
ffs.h
View File

@ -19,7 +19,7 @@ WITHWARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
// C++ functions // C++ functions
// GUID to QString routine // GUID to QString routine
extern QString guidToQString(const EFI_GUID guid); extern QString guidToQString(const EFI_GUID& guid);
// File type to QString routine // File type to QString routine
extern QString fileTypeToQString(const UINT8 type); extern QString fileTypeToQString(const UINT8 type);
// Section type to QString routine // Section type to QString routine

View File

@ -369,14 +369,13 @@ UINT8 FfsEngine::parseMeRegion(const QByteArray & me, QModelIndex & index, const
QString info = tr("Size: %1"). QString info = tr("Size: %1").
arg(me.size(), 8, 16, QChar('0')); arg(me.size(), 8, 16, QChar('0'));
ME_VERSION* version;
INT32 versionOffset = me.indexOf(ME_VERSION_SIGNATURE); INT32 versionOffset = me.indexOf(ME_VERSION_SIGNATURE);
if (versionOffset < 0){ if (versionOffset < 0){
info += tr("\nVersion: unknown"); info += tr("\nVersion: unknown");
msg(tr("parseRegion: ME region version is unknown, it can be damaged"), parent); msg(tr("parseRegion: ME region version is unknown, it can be damaged"), parent);
} }
else { else {
version = (ME_VERSION*) (me.constData() + versionOffset); ME_VERSION* version = (ME_VERSION*) (me.constData() + versionOffset);
info += tr("\nVersion: %1.%2.%3.%4") info += tr("\nVersion: %1.%2.%3.%4")
.arg(version->major) .arg(version->major)
.arg(version->minor) .arg(version->minor)

View File

@ -531,7 +531,7 @@ void UEFITool::showMessages()
void UEFITool::scrollTreeView(QListWidgetItem* item) void UEFITool::scrollTreeView(QListWidgetItem* item)
{ {
MessageListItem* messageItem = (MessageListItem*) item; MessageListItem* messageItem = static_cast<MessageListItem*>(item);
QModelIndex index = messageItem->index(); QModelIndex index = messageItem->index();
if (index.isValid()) { if (index.isValid()) {
ui->structureTreeView->scrollTo(index); ui->structureTreeView->scrollTo(index);