Mark Infer false positives in unit-json_view_image
Infer 1.3.0 reports NULLPTR_DEREFERENCE for passing a freshly parsed document to check_round_trip(). Suppress it on those two lines, as develop does for its own Infer false positives (#5750). Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
1 file changed
+4
@@ -169,7 +169,11 @@ TEST_CASE("json_view images: round trips")
|
|||||||
})
|
})
|
||||||
{
|
{
|
||||||
CAPTURE(text);
|
CAPTURE(text);
|
||||||
|
// false positive: parse() returns a document with a root
|
||||||
|
// @infer-ignore NULLPTR_DEREFERENCE
|
||||||
check_round_trip(json_document::parse(text));
|
check_round_trip(json_document::parse(text));
|
||||||
|
// false positive: parse() returns a document with a root
|
||||||
|
// @infer-ignore NULLPTR_DEREFERENCE
|
||||||
check_round_trip(ordered_json_document::parse(text));
|
check_round_trip(ordered_json_document::parse(text));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user