MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / uninitVar37

Method uninitVar37

test/testconstructors.cpp:3089–3096  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3087 }
3088
3089 void uninitVar37() {
3090 const Settings s = settingsBuilder(settings).library("std.cfg").build();
3091 check("struct C {\n" // #13989
3092 " C() = default;\n"
3093 " std::list<int>::const_iterator it;\n"
3094 "};\n", s);
3095 ASSERT_EQUALS("[test.cpp:2:5]: (warning) Member variable 'C::it' is not initialized in the constructor. [uninitMemberVar]\n", errout_str());
3096 }
3097
3098 void uninitVarArray1() {
3099 check("class John\n"

Callers

nothing calls this directly

Calls 2

buildMethod · 0.80
libraryMethod · 0.80

Tested by

no test coverage detected