From de6a93a160e195a1c7b95eae59722ee68f4d71e9 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Tue, 28 Nov 2017 19:48:32 +0000 Subject: [PATCH] decoder_detail: Lambda captures may be unused if iota is an empty sequence Closes #120 --- src/frontend/decoder/decoder_detail.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/frontend/decoder/decoder_detail.h b/src/frontend/decoder/decoder_detail.h index 17f0cc07..bd4acf4f 100644 --- a/src/frontend/decoder/decoder_detail.h +++ b/src/frontend/decoder/decoder_detail.h @@ -117,6 +117,8 @@ private: static_assert(std::is_same::value, "Member function is not from Matcher's Visitor"); return [fn, arg_masks, arg_shifts](Visitor& v, opcode_type instruction) { (void)instruction; + (void)arg_masks; + (void)arg_shifts; return (v.*fn)(static_cast((instruction & arg_masks[iota]) >> arg_shifts[iota])...); }; } @@ -132,6 +134,8 @@ private: static_assert(std::is_same::value, "Member function is not from Matcher's Visitor"); return [fn, arg_masks, arg_shifts](const Visitor& v, opcode_type instruction) { (void)instruction; + (void)arg_masks; + (void)arg_shifts; return (v.*fn)(static_cast((instruction & arg_masks[iota]) >> arg_shifts[iota])...); }; }