Index: relaxng.c =================================================================== --- relaxng.c (revision 151116) +++ relaxng.c (working copy) @@ -2088,6 +2088,7 @@ const xmlChar * arg2) { char msg[1000]; + xmlChar *result=NULL; if (arg1 == NULL) arg1 = BAD_CAST ""; @@ -2215,7 +2216,7 @@ snprintf(msg, 1000, "Unknown error code %d\n", err); } msg[1000 - 1] = 0; - xmlChar *result = xmlCharStrdup(msg); + result = xmlCharStrdup(msg); return (xmlEscapeFormatString(&result)); } Index: xmlschemas.c =================================================================== --- xmlschemas.c (revision 151116) +++ xmlschemas.c (working copy) @@ -3121,6 +3121,7 @@ const xmlChar *str2) { xmlChar *msg = NULL; + xmlChar *expectedEscaped = NULL; xmlSchemaFormatNodeForError(&msg, ACTXT_CAST ctxt, node); if (message == NULL) { @@ -3169,7 +3170,7 @@ } if (expected) { msg = xmlStrcat(msg, BAD_CAST " Expected is '"); - xmlChar *expectedEscaped = xmlCharStrdup(expected); + expectedEscaped = xmlCharStrdup(expected); msg = xmlStrcat(msg, xmlEscapeFormatString(&expectedEscaped)); FREE_AND_NULL(expectedEscaped); msg = xmlStrcat(msg, BAD_CAST "'.\n");