Fix unused variable warning
Also fix test in wchar_t mode.
This commit is contained in:
parent
f04b56e178
commit
9539c488c2
@ -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);
|
||||
}
|
||||
|
@ -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()));
|
||||
|
Loading…
Reference in New Issue
Block a user