Helmut Grohne wrote:

class Foo {
                int foo;
        public:
                Foo(std::istream &in) { if(!(in >> foo)) throw 0; }
};
$ cppcheck testcase.c++
Checking testcase.c++: ...
[testcase.c++:6] Uninitialized member variable 'Foo::foo'

Thanks for the bug report.

I fixed this in upstream revision 1006, so it should be fixed in next release.

False positives are considered as bugs, not feature requests in the upstream. Generally we either fix the false positive, or if it is too difficult at the moment, we move the check behind the --all option. We aim to keep the amount of false positives in zero. So if you see any more of these, feel free to report.

FYI checking of uninitialized member variables is moved behind --style check. So expect this to be changed also in next release.

So to run the same test, you will need to do:
$ cppcheck --style testcase.c++

(--style will run default tests and in addition test in --style section)

--
Reijo



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to