diff --git a/include/nlohmann/detail/input/binary_reader.hpp b/include/nlohmann/detail/input/binary_reader.hpp index 8141bc02b..1fdda20ab 100644 --- a/include/nlohmann/detail/input/binary_reader.hpp +++ b/include/nlohmann/detail/input/binary_reader.hpp @@ -2657,6 +2657,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 4976b2e81..bd4b8aa8e 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -20434,6 +20434,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) {