@@ -3532,6 +3532,7 @@ class TestBufferOverrun : public TestFixture {
35323532 }
35333533
35343534 void buffer_overrun_readSizeFromCfg () {
3535+ Settings settings;
35353536 const char xmldata[] = " <?xml version=\" 1.0\" ?>\n "
35363537 " <def>\n "
35373538 " <podtype name=\" u8\" sign=\" u\" size=\" 1\" />\n "
@@ -3543,7 +3544,7 @@ class TestBufferOverrun : public TestFixture {
35433544 " <arg nr=\" 2\" />\n "
35443545 " </function>\n "
35453546 " </def>" ;
3546- const Settings settings = settingsBuilder (). libraryxml (xmldata, sizeof (xmldata)). build ( );
3547+ ASSERT (settings. library . loadxmldata (xmldata, sizeof (xmldata)));
35473548
35483549 // Attempt to get size from Cfg files, no false positives if size is not specified
35493550 check (" void f() {\n "
@@ -4084,6 +4085,7 @@ class TestBufferOverrun : public TestFixture {
40844085 // extracttests.disable
40854086
40864087 void minsize_argvalue () {
4088+ Settings settings;
40874089 const char xmldata[] = " <?xml version=\" 1.0\" ?>\n "
40884090 " <def>\n "
40894091 " <function name=\" mymemset\" >\n "
@@ -4095,7 +4097,8 @@ class TestBufferOverrun : public TestFixture {
40954097 " <arg nr=\" 3\" />\n "
40964098 " </function>\n "
40974099 " </def>" ;
4098- Settings settings = settingsBuilder ().libraryxml (xmldata, sizeof (xmldata)).severity (Severity::warning).build ();
4100+ ASSERT (settings.library .loadxmldata (xmldata, sizeof (xmldata)));
4101+ settings.severity .enable (Severity::warning);
40994102 settings.platform .sizeof_wchar_t = 4 ;
41004103
41014104 check (" void f() {\n "
@@ -4221,6 +4224,7 @@ class TestBufferOverrun : public TestFixture {
42214224 }
42224225
42234226 void minsize_sizeof () {
4227+ Settings settings;
42244228 const char xmldata[] = " <?xml version=\" 1.0\" ?>\n "
42254229 " <def>\n "
42264230 " <function name=\" mystrncpy\" >\n "
@@ -4233,7 +4237,7 @@ class TestBufferOverrun : public TestFixture {
42334237 " <arg nr=\" 3\" />\n "
42344238 " </function>\n "
42354239 " </def>" ;
4236- const Settings settings = settingsBuilder (). libraryxml (xmldata, sizeof (xmldata)). build ( );
4240+ ASSERT (settings. library . loadxmldata (xmldata, sizeof (xmldata)));
42374241
42384242 check (" void f() {\n "
42394243 " char c[7];\n "
@@ -4281,6 +4285,7 @@ class TestBufferOverrun : public TestFixture {
42814285 }
42824286
42834287 void minsize_strlen () {
4288+ Settings settings;
42844289 const char xmldata[] = " <?xml version=\" 1.0\" ?>\n "
42854290 " <def>\n "
42864291 " <function name=\" mysprintf\" >\n "
@@ -4294,7 +4299,7 @@ class TestBufferOverrun : public TestFixture {
42944299 " </arg>\n "
42954300 " </function>\n "
42964301 " </def>" ;
4297- const Settings settings = settingsBuilder (). libraryxml (xmldata, sizeof (xmldata)). build ( );
4302+ ASSERT (settings. library . loadxmldata (xmldata, sizeof (xmldata)));
42984303
42994304 // formatstr..
43004305 check (" void f() {\n "
@@ -4394,6 +4399,7 @@ class TestBufferOverrun : public TestFixture {
43944399 }
43954400
43964401 void minsize_mul () {
4402+ Settings settings;
43974403 const char xmldata[] = " <?xml version=\" 1.0\" ?>\n "
43984404 " <def>\n "
43994405 " <function name=\" myfread\" >\n "
@@ -4405,7 +4411,7 @@ class TestBufferOverrun : public TestFixture {
44054411 " <arg nr=\" 4\" />\n "
44064412 " </function>\n "
44074413 " </def>" ;
4408- const Settings settings = settingsBuilder (). libraryxml (xmldata, sizeof (xmldata)). build ( );
4414+ ASSERT (settings. library . loadxmldata (xmldata, sizeof (xmldata)));
44094415
44104416 check (" void f() {\n "
44114417 " char c[5];\n "
0 commit comments