]> git.stg.codes - stg.git/blobdiff - projects/sgconf/parser.cpp
Unused code.
[stg.git] / projects / sgconf / parser.cpp
index 20dd06145b4331731b2678ddba43ea07d8db1735..9d340e8315f4e41780b650a8c953d30bca64e8d1 100644 (file)
@@ -33,9 +33,9 @@
 #include <string>
 #include <list>
 
-#include "common.h"
-#include "netunit.h"
-#include "request.h"
+#include "stg/common.h"
+#include "stg/netunit.h"
+#include "stg/request.h"
 
 using namespace std;
 
@@ -86,7 +86,6 @@ parse_depth--;
 int ParseReply(void * data, list<string> * ans)
 {
 int done = 0;
-int len;
 
 parse_depth = 0;
 parser = XML_ParserCreate(NULL);
@@ -103,16 +102,15 @@ XML_SetElementHandler(parser, StartElement, EndElement);
 list<string>::iterator n = ans->begin();
 while (n != ans->end())
     {
-    len = strlen(n->c_str());
+    size_t len = strlen(n->c_str());
 
     if (++n == ans->end())
         done = 1;
-    n--;
+    --n;
 
     if (XML_Parse(parser, n->c_str(), len, done) == XML_STATUS_ERROR)
         {
-        char s[128];
-        printf(s, "Parse error at line %d:\n%s\n",
+        printf("Parse error at line %d:\n%s\n",
                XML_GetCurrentLineNumber(parser),
                XML_ErrorString(XML_GetErrorCode(parser)));
         exit(UNKNOWN_ERR_CODE);