From 5e295382d716e3de894bd97f4a507ff3bd53c01b Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Mon, 21 Nov 2022 17:03:58 +0100 Subject: [PATCH] Clear out some unused code in QStorageIterator::next() on Unix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The code to save parent_id, actually a member variable that's commented out, presumably because we have no use for it, was declaring a variable to save it in and then Q_UNUSED()ing it. It is simpler to just not do any of that. Since this "code" did at least document where to get the parent_id, if we ever do want it, and what the number just parsed actually means, keep the assignment as a comment but make clear why it's commented out. Change-Id: Iec59fa4d1af6c7e3b16570a612178a54004ebb70 Reviewed-by: Thiago Macieira Reviewed-by: MÃ¥rten Nordheim --- src/corelib/io/qstorageinfo_unix.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/corelib/io/qstorageinfo_unix.cpp b/src/corelib/io/qstorageinfo_unix.cpp index d815708ab0..c58b7ce87d 100644 --- a/src/corelib/io/qstorageinfo_unix.cpp +++ b/src/corelib/io/qstorageinfo_unix.cpp @@ -463,8 +463,7 @@ inline bool QStorageIterator::next() r = qstrntoll(ptr, stop - ptr, 10); if (!r.ok()) return false; - int parent_id = r.result; - Q_UNUSED(parent_id); + // parent_id = r.result; // member currently not in use ptr += r.used; r = qstrntoll(ptr, stop - ptr, 10);