Giacomo Travaglini has uploaded this change for review. (
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>
---
M src/dev/qemu/fw_cfg.cc
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/src/dev/qemu/fw_cfg.cc b/src/dev/qemu/fw_cfg.cc
index 15a442b..f113afe 100644
--- a/src/dev/qemu/fw_cfg.cc
+++ b/src/dev/qemu/fw_cfg.cc
@@ -124,11 +124,11 @@
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.",
- item->path());
+ 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: 1
Gerrit-Owner: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-MessageType: newchange
_______________________________________________
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