From 154884dea37204e78bad1a3a9d9dbc8cdf234794 Mon Sep 17 00:00:00 2001 From: Giacomo Travaglini Date: Tue, 1 Mar 2022 10:27:22 +0000 Subject: [PATCH] sim: Avoid -Werror=unused-variable in bufval unittests Some compilers (e.g. gcc-7.5) throw a warning/error when a structured binding variable is not used. Change-Id: Ib5090508d135e4a72c39f18b316c76674c3bd8f3 Signed-off-by: Giacomo Travaglini Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/57229 Reviewed-by: Gabe Black Maintainer: Gabe Black Tested-by: kokoro --- src/sim/bufval.test.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/sim/bufval.test.cc b/src/sim/bufval.test.cc index 91c074af56..e5a063541d 100644 --- a/src/sim/bufval.test.cc +++ b/src/sim/bufval.test.cc @@ -40,8 +40,7 @@ template bool pairFail(const std::pair &p) { - auto &[first, success] = p; - return !success; + return !p.second; } bool