summaryrefslogtreecommitdiff
path: root/xml.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-04-14 06:13:14 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:35:32 -0400
commit0e02961b00a9eb52cf3e1cbdbede7d5295a80b8f (patch)
tree8328fa28555c1ba64ee2eca5d3fbb6324f0a906c /xml.cc
parent608d4f59fe00269a23079d3bbae7f06ec9711e6a (diff)
downloadfork-ledger-0e02961b00a9eb52cf3e1cbdbede7d5295a80b8f.tar.gz
fork-ledger-0e02961b00a9eb52cf3e1cbdbede7d5295a80b8f.tar.bz2
fork-ledger-0e02961b00a9eb52cf3e1cbdbede7d5295a80b8f.zip
Cleaned up warnings revealed by building with Xcode.
Diffstat (limited to 'xml.cc')
-rw-r--r--xml.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/xml.cc b/xml.cc
index 7705d5bb..4b47e5aa 100644
--- a/xml.cc
+++ b/xml.cc
@@ -320,7 +320,6 @@ document_t * parser_t::parse(std::istream& in, const char ** builtins,
document = doc.get();
- unsigned int offset = 2;
parser = XML_ParserCreate(NULL);
XML_SetElementHandler(parser, startElement, endElement);
@@ -336,20 +335,20 @@ document_t * parser_t::parse(std::istream& in, const char ** builtins,
result = XML_Parse(parser, buf, std::strlen(buf), in.eof());
}
catch (const std::exception& err) {
- unsigned long line = XML_GetCurrentLineNumber(parser) - offset++;
+ //unsigned long line = XML_GetCurrentLineNumber(parser) - offset++;
XML_ParserFree(parser);
throw new parse_error(err.what());
}
if (! have_error.empty()) {
- unsigned long line = XML_GetCurrentLineNumber(parser) - offset++;
+ //unsigned long line = XML_GetCurrentLineNumber(parser) - offset++;
parse_error err(have_error);
std::cerr << "Error: " << err.what() << std::endl;
have_error = "";
}
if (! result) {
- unsigned long line = XML_GetCurrentLineNumber(parser) - offset++;
+ //unsigned long line = XML_GetCurrentLineNumber(parser) - offset++;
const char * err = XML_ErrorString(XML_GetErrorCode(parser));
XML_ParserFree(parser);
throw new parse_error(err);
@@ -426,8 +425,10 @@ node_t * account_node_t::children() const
node_t * journal_node_t::children() const
{
if (! _children) {
+#if 0
account_node_t * master_account =
new account_node_t(document, journal->master, const_cast<journal_node_t *>(this));
+#endif
parent_node_t * entries =
new parent_node_t(document, const_cast<journal_node_t *>(this));