🚨 fix C4100 warnings

This commit is contained in:
Niels Lohmann
2021-08-13 17:03:55 +02:00
parent 288cdf9af7
commit 4b0e04eb68
2 changed files with 5 additions and 11 deletions
+4 -7
View File
@@ -809,10 +809,6 @@ TEST_CASE("an incomplete type does not trigger a compiler error in non-evaluated
static_assert(!is_constructible_patched<json, incomplete>::value, "");
}
// the code below warns about t in MSVC 2015 - this could be a bug
DOCTEST_MSVC_SUPPRESS_WARNING_PUSH
DOCTEST_MSVC_SUPPRESS_WARNING(4100)
namespace
{
class Evil
@@ -820,13 +816,14 @@ class Evil
public:
Evil() = default;
template <typename T>
Evil(T t) : m_i(sizeof(t)) {}
Evil(T t) : m_i(sizeof(t))
{
static_cast<void>(t); // fix MSVC's C4100 warning
}
int m_i = 0;
};
DOCTEST_MSVC_SUPPRESS_WARNING_POP
void from_json(const json& /*unused*/, Evil& /*unused*/) {}
} // namespace