From a9c6f347a250e4908cbd1998ef2f56770b64c540 Mon Sep 17 00:00:00 2001 From: Nikolaj Schlej Date: Sat, 10 Sep 2022 14:32:10 +0200 Subject: [PATCH] Fix another issue spotted by PVS-Studio --- common/bstrlib/bstrlib.c | 2 +- common/ffsparser.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/bstrlib/bstrlib.c b/common/bstrlib/bstrlib.c index 2b729a9bf..bc6d207e9 100644 --- a/common/bstrlib/bstrlib.c +++ b/common/bstrlib/bstrlib.c @@ -317,7 +317,7 @@ char * r; if (b == NULL || b->slen < 0 || b->data == NULL) return NULL; l = b->slen; - r = (char *) bstr__alloc ((size_t) (l + 1)); + r = (char *) bstr__alloc ((size_t)l + 1); if (r == NULL) return r; for (i=0; i < l; i ++) { diff --git a/common/ffsparser.cpp b/common/ffsparser.cpp index c4c869802..6ca25607e 100644 --- a/common/ffsparser.cpp +++ b/common/ffsparser.cpp @@ -4513,7 +4513,7 @@ USTATUS FfsParser::parseCpdRegion(const UByteArray & region, const UINT32 localO info += UString("\nHash: ") + UString(hash.toHex().constData()); UModelIndex codeIndex = model->addItem(localOffset + partitions[i].ptEntry.Offset.Offset, Types::CpdPartition, Subtypes::CodeCpdPartition, name, UString(), info, UByteArray(), partition, UByteArray(), Fixed, parent); - parseRawArea(codeIndex); + (void)parseRawArea(codeIndex); } } else if (partitions[i].type == Types::Padding) {