diff options
author | John Wiegley <johnw@newartisans.com> | 2007-05-16 05:38:01 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 03:38:52 -0400 |
commit | 8cdc8008c36bd03e44e43aef3fc84ff20df7bd34 (patch) | |
tree | b4efb59a6c41d22cbc7e651f8ce215e38e95bfc4 /src/xpath.cc | |
parent | 8a2b87e6e1f5cd8784130f3cfcd1911b214c55cc (diff) | |
download | ledger-8cdc8008c36bd03e44e43aef3fc84ff20df7bd34.tar.gz ledger-8cdc8008c36bd03e44e43aef3fc84ff20df7bd34.tar.bz2 ledger-8cdc8008c36bd03e44e43aef3fc84ff20df7bd34.zip |
Corrected problem with uninitialized value_t's.
Diffstat (limited to 'src/xpath.cc')
-rw-r--r-- | src/xpath.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/xpath.cc b/src/xpath.cc index 2a28956d..2a9ec1e5 100644 --- a/src/xpath.cc +++ b/src/xpath.cc @@ -1723,7 +1723,6 @@ bool xpath_t::op_t::print(std::ostream& out, unsigned long * start_pos, unsigned long * end_pos) const { - int arg_index = 0; bool found = false; if (start_pos && this == op_to_find) { @@ -1737,6 +1736,9 @@ bool xpath_t::op_t::print(std::ostream& out, case VALUE: { const value_t& value(as_value()); switch (value.type()) { + case value_t::VOID: + out << "<VOID>"; + break; case value_t::BOOLEAN: if (value) out << "1"; @@ -2235,6 +2237,10 @@ void xpath_t::path_t::walk_elements(node_t& start, check_element(*node, element, scope, index++, size, func); break; } + + default: + assert(false); + break; } } else if (start.is_parent_node()) { |