diff --git a/include/nlohmann/detail/input/binary_reader.hpp b/include/nlohmann/detail/input/binary_reader.hpp index d1ce01a86..37b1b0e18 100644 --- a/include/nlohmann/detail/input/binary_reader.hpp +++ b/include/nlohmann/detail/input/binary_reader.hpp @@ -1720,6 +1720,8 @@ class binary_reader const auto* const data = reinterpret_cast(ia.bulk_data()); const unsigned char head = data[0]; std::size_t size = 0; + // false positive: every case assigns accepted before it is read + // @infer-ignore DEAD_STORE bool accepted = true; switch (head) { diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index a07e15130..884532424 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -19497,6 +19497,8 @@ class binary_reader const auto* const data = reinterpret_cast(ia.bulk_data()); const unsigned char head = data[0]; std::size_t size = 0; + // false positive: every case assigns accepted before it is read + // @infer-ignore DEAD_STORE bool accepted = true; switch (head) {