Just upgraded to 2.4 and have found two minor False Positives
The first thinks that zero-initialization of a std::array will empty it and the other claims that a variable is uninitialized even though it is not (I admit the usage is rather odd)
void fp_1() { std::array<int, 4> a = {}; std::cout << a[0]; // warning: Out of bounds access in expression 'a[0]' because 'a' is empty. [containerOutOfBounds] } void fp_2() { std::stringstream ss("1 2 3 4"); for (int i; ss >> i;) // warning: Uninitialized variable: i [uninitvar] std::cout << i; }
The first FP should be covered by this.
Second ticket is here.
Log in to post a comment.
Just upgraded to 2.4 and have found two minor False Positives
The first thinks that zero-initialization of a std::array will empty it and the other claims that a variable is uninitialized even though it is not (I admit the usage is rather odd)
The first FP should be covered by this.
Last edit: CHR 2021-03-23
Second ticket is here.