From 63d7e433f104dd13d015df3a048697fad6d43a55 Mon Sep 17 00:00:00 2001 From: deva Date: Thu, 15 May 2008 14:19:02 +0000 Subject: Added a lot of testcode... and fixed a lot of minor error (-Wall -Werror) --- server/src/saxparser.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'server/src/saxparser.cc') diff --git a/server/src/saxparser.cc b/server/src/saxparser.cc index e0d849a..2eabf38 100644 --- a/server/src/saxparser.cc +++ b/server/src/saxparser.cc @@ -68,6 +68,11 @@ SAXParser::SAXParser() XML_SetElementHandler(p, start_hndl, end_hndl); } +SAXParser::~SAXParser() +{ + XML_ParserFree(p); +} + int SAXParser::parse() { char buf[32]; @@ -77,7 +82,7 @@ int SAXParser::parse() len = readData(buf, sizeof(buf) - 1); if (! XML_Parse(p, buf, len, len == 0)) { fprintf(stderr, "Parse error at line %d:\n%s\n", - XML_GetCurrentLineNumber(p), + (int)XML_GetCurrentLineNumber(p), XML_ErrorString(XML_GetErrorCode(p))); return -1; } -- cgit v1.2.3