diff --git a/include/nlohmann/detail/input/binary_reader.hpp b/include/nlohmann/detail/input/binary_reader.hpp index 4bcd98022..190562650 100644 --- a/include/nlohmann/detail/input/binary_reader.hpp +++ b/include/nlohmann/detail/input/binary_reader.hpp @@ -1715,6 +1715,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 22022146a..80cdaf1b1 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -19491,6 +19491,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) {