Commit 5d10d446 authored by Michael Pyne's avatar Michael Pyne
Browse files

Make static analyzer happy about uninit variables.

Coverity complains about an index being unset (CID 1356740). While I'm
pretty sure this is a false positive given the code path in question
there's no performance reason not to set the index here.

While I was at it, I also fixed a GCC warning about a separate
"potentially uninitialized" variable. Again seems to be a false positive
(unless an extract operation starts somehow already marked to abort) but
fixing anyways. I chose ARCHIVE_RETRY to hint to *not* abort the
operation if this does somehow make it into error path.
parent 5dff013d
......@@ -85,7 +85,7 @@ bool LibarchivePlugin::list()
m_extractedFilesSize = 0;
struct archive_entry *aentry;
int result;
int result = ARCHIVE_RETRY;
bool firstEntry = true;
while (!m_abortOperation && (result = archive_read_next_header(, &aentry)) == ARCHIVE_OK) {
......@@ -234,7 +234,7 @@ bool LibarchivePlugin::copyFiles(const QVariantList& files, const QString& desti
int index;
int index = -1;
// Retry with renamed entry, fire an overwrite query again
// if the new entry also exists.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment