Fix unused variable warning

Also fix test in wchar_t mode.
This commit is contained in:
Arseny Kapoulkine 2015-04-12 22:06:17 -07:00
parent f04b56e178
commit 9539c488c2
2 changed files with 3 additions and 2 deletions

View File

@ -5306,7 +5306,7 @@ namespace pugi
name_sentry sentry = { _root, _root->name };
_root->name = 0;
sentry.node->name = 0;
return impl::load_buffer_impl(doc, _root, const_cast<void*>(contents), size, options, encoding, false, false, &extra->buffer);
}

View File

@ -905,7 +905,8 @@ TEST(dom_node_out_of_memory)
xml_attribute a = n.append_attribute(STR("a"));
CHECK(a);
CHECK_ALLOC_FAIL(while (n.append_child(node_comment) || n.append_attribute(STR("b"))) { /* nop */ });
CHECK_ALLOC_FAIL(while (n.append_child(node_comment)) { /* nop */ });
CHECK_ALLOC_FAIL(while (n.append_attribute(STR("b"))) { /* nop */ });
// verify all node modification operations
CHECK_ALLOC_FAIL(CHECK(!n.append_child()));