Giacomo Travaglini has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/57349 )

Change subject: dev: Fix -Werror=unused-variable in QEMU config device
......................................................................

dev: Fix -Werror=unused-variable in QEMU config device

Same issue as:

https://gem5-review.googlesource.com/c/public/gem5/+/57229

Change-Id: Id33a1131a70136a2435f733295fa97a44ee70496
Signed-off-by: Giacomo Travaglini <giacomo.travagl...@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/57349
Reviewed-by: Gabe Black <gabe.bl...@gmail.com>
Maintainer: Gabe Black <gabe.bl...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/dev/qemu/fw_cfg.cc
1 file changed, 21 insertions(+), 3 deletions(-)

Approvals:
  Gabe Black: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/dev/qemu/fw_cfg.cc b/src/dev/qemu/fw_cfg.cc
index 15a442b..09f0efa 100644
--- a/src/dev/qemu/fw_cfg.cc
+++ b/src/dev/qemu/fw_cfg.cc
@@ -124,10 +124,10 @@

     const std::string &path = item->path();
     if (path.empty() || path[0] != '.') {
-        const auto [pit, psuccess] =
+        const auto res =
             names.insert(std::make_pair(item->path(), item->index()));

-        panic_if(!psuccess, "Duplicate firmware config item path %s.",
+        panic_if(!res.second, "Duplicate firmware config item path %s.",
                 item->path());
     }
 }
@@ -147,7 +147,7 @@
         return;
     }

-    auto [index, item] = *iter;
+    auto item = iter->second;

     current = item;
     if (current)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/57349
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Id33a1131a70136a2435f733295fa97a44ee70496
Gerrit-Change-Number: 57349
Gerrit-PatchSet: 3
Gerrit-Owner: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to