[LIBXML2]
authorThomas Faber <thomas.faber@reactos.org>
Sat, 9 Jul 2016 21:01:11 +0000 (21:01 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sat, 9 Jul 2016 21:01:11 +0000 (21:01 +0000)
- Fix MSVC build (already fixed upstream)

svn path=/trunk/; revision=71877

reactos/sdk/lib/3rdparty/libxml2/relaxng.c
reactos/sdk/lib/3rdparty/libxml2/xmlschemas.c

index 56a3344..3d3e69c 100644 (file)
@@ -2088,6 +2088,7 @@ xmlRelaxNGGetErrorString(xmlRelaxNGValidErr err, const xmlChar * arg1,
                          const xmlChar * arg2)
 {
     char msg[1000];
                          const xmlChar * arg2)
 {
     char msg[1000];
+    xmlChar *result;
 
     if (arg1 == NULL)
         arg1 = BAD_CAST "";
 
     if (arg1 == NULL)
         arg1 = BAD_CAST "";
@@ -2215,7 +2216,7 @@ xmlRelaxNGGetErrorString(xmlRelaxNGValidErr err, const xmlChar * arg1,
         snprintf(msg, 1000, "Unknown error code %d\n", err);
     }
     msg[1000 - 1] = 0;
         snprintf(msg, 1000, "Unknown error code %d\n", err);
     }
     msg[1000 - 1] = 0;
-    xmlChar *result = xmlCharStrdup(msg);
+    result = xmlCharStrdup(msg);
     return (xmlEscapeFormatString(&result));
 }
 
     return (xmlEscapeFormatString(&result));
 }
 
index e1b3a4f..7afe2eb 100644 (file)
@@ -3168,8 +3168,8 @@ xmlSchemaPSimpleTypeErr(xmlSchemaParserCtxtPtr ctxt,
                "valid.");
        }
        if (expected) {
                "valid.");
        }
        if (expected) {
-           msg = xmlStrcat(msg, BAD_CAST " Expected is '");
            xmlChar *expectedEscaped = xmlCharStrdup(expected);
            xmlChar *expectedEscaped = xmlCharStrdup(expected);
+           msg = xmlStrcat(msg, BAD_CAST " Expected is '");
            msg = xmlStrcat(msg, xmlEscapeFormatString(&expectedEscaped));
            FREE_AND_NULL(expectedEscaped);
            msg = xmlStrcat(msg, BAD_CAST "'.\n");
            msg = xmlStrcat(msg, xmlEscapeFormatString(&expectedEscaped));
            FREE_AND_NULL(expectedEscaped);
            msg = xmlStrcat(msg, BAD_CAST "'.\n");