diff --git a/include/nlohmann/detail/input/binary_reader.hpp b/include/nlohmann/detail/input/binary_reader.hpp index 28af01bee..8141bc02b 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 9584e90a8..4976b2e81 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) {