Compare commits

..
5 Commits
Author SHA1 Message Date
Niels Lohmann af60d07e89 Merge branch 'perf/msgpack-scalar-runs' into perf/ubjson-typed-arrays
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
2026-10-31 20:20:38 +01:00
Niels Lohmann d2436351cd MessagePack reader: mark the initial accepted in the scalar run as a false-positive dead store
ci_infer reports DEAD_STORE for 'bool accepted = true;' in the MessagePack
scalar run, as in the CBOR one, because every case assigns accepted before it
is read.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
2026-10-31 20:20:38 +01:00
Niels Lohmann 2a816f9842 Merge branch 'perf/binary-reader-byteswap' into perf/msgpack-scalar-runs
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
2026-10-31 20:20:27 +01:00
Niels Lohmann a0e2cdbab9 Merge branch 'perf/cbor-scalar-runs' into perf/binary-reader-byteswap
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
2026-10-31 20:20:17 +01:00
Niels Lohmann bf81ab564f CBOR reader: mark the initial accepted in the scalar run as a false-positive dead store
ci_infer reports DEAD_STORE for 'bool accepted = true;' in
parse_cbor_scalar_run because every case assigns accepted before it is read.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
2026-10-31 20:20:16 +01:00
2 changed files with 8 additions and 0 deletions

No files matched your search

@@ -1720,6 +1720,8 @@ class binary_reader
const auto* const data = reinterpret_cast<const unsigned char*>(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)
{
@@ -2655,6 +2657,8 @@ class binary_reader
const auto* const data = reinterpret_cast<const unsigned char*>(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)
{
+4
View File
@@ -19497,6 +19497,8 @@ class binary_reader
const auto* const data = reinterpret_cast<const unsigned char*>(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)
{
@@ -20432,6 +20434,8 @@ class binary_reader
const auto* const data = reinterpret_cast<const unsigned char*>(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)
{