From ae145293cc589a4e991eb99656d9ab234d738c16 Mon Sep 17 00:00:00 2001 From: Stefan F <32997632+stefan301@users.noreply.github.com> Date: Tue, 31 Aug 2021 00:32:36 +0200 Subject: [PATCH] flattests_cpp17 doesn't compile with Visual Studio 2017: warning C4100: 'indent': unreferenced formal parameter (#6811) stringify_util.h(127): error C2220: warning treated as error - no 'object' file generated stringify_util.h(127): warning C4100: 'indent': unreferenced formal parameter stringify_util.h(85): warning C4100: 'indent': unreferenced formal parameter stringify_util.h(85): warning C4100: 'fbs': unreferenced formal parameter --- tests/cpp17/stringify_util.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/cpp17/stringify_util.h b/tests/cpp17/stringify_util.h index dc9472240..e2e7e2230 100644 --- a/tests/cpp17/stringify_util.h +++ b/tests/cpp17/stringify_util.h @@ -83,6 +83,8 @@ std::string StringifyTableOrStructImpl(const FBS &fbs, template std::string StringifyTableOrStruct(const FBS &fbs, const std::string &indent) { + (void)fbs; + (void)indent; static constexpr size_t field_count = FBS::Traits::fields_number; std::string out; if constexpr (field_count > 0) { @@ -125,6 +127,7 @@ template std::string StringifyArithmeticType(T val) { template std::optional StringifyFlatbufferValue(T &&val, const std::string &indent) { + (void)indent; constexpr bool is_pointer = std::is_pointer_v>; if constexpr (is_pointer) { if (val == nullptr) return std::nullopt; // Field is absent.