Commit 4608f359 authored by Tom Lane's avatar Tom Lane

Fix a passel of signed vs unsigned char warnings.

parent cfd6c89b
...@@ -209,7 +209,7 @@ xml_encode_special_chars(PG_FUNCTION_ARGS) ...@@ -209,7 +209,7 @@ xml_encode_special_chars(PG_FUNCTION_ARGS)
pfree(ts); pfree(ts);
ressize = strlen(tt); ressize = strlen((char *) tt);
tout = (text *) palloc(ressize + VARHDRSZ); tout = (text *) palloc(ressize + VARHDRSZ);
memcpy(VARDATA(tout), tt, ressize); memcpy(VARDATA(tout), tt, ressize);
SET_VARSIZE(tout, ressize + VARHDRSZ); SET_VARSIZE(tout, ressize + VARHDRSZ);
...@@ -265,7 +265,7 @@ pgxmlNodeSetToText(xmlNodeSetPtr nodeset, ...@@ -265,7 +265,7 @@ pgxmlNodeSetToText(xmlNodeSetPtr nodeset,
/* If this isn't the last entry, write the plain sep. */ /* If this isn't the last entry, write the plain sep. */
if (i < (nodeset->nodeNr) - 1) if (i < (nodeset->nodeNr) - 1)
xmlBufferWriteChar(buf, plainsep); xmlBufferWriteChar(buf, (char *) plainsep);
} }
else else
{ {
...@@ -604,12 +604,12 @@ pgxml_result_to_text(xmlXPathObjectPtr res, ...@@ -604,12 +604,12 @@ pgxml_result_to_text(xmlXPathObjectPtr res,
default: default:
elog(NOTICE, "unsupported XQuery result: %d", res->type); elog(NOTICE, "unsupported XQuery result: %d", res->type);
xpresstr = xmlStrdup("<unsupported/>"); xpresstr = xmlStrdup((const xmlChar *) "<unsupported/>");
} }
/* Now convert this result back to text */ /* Now convert this result back to text */
ressize = strlen(xpresstr); ressize = strlen((char *) xpresstr);
xpres = (text *) palloc(ressize + VARHDRSZ); xpres = (text *) palloc(ressize + VARHDRSZ);
memcpy(VARDATA(xpres), xpresstr, ressize); memcpy(VARDATA(xpres), xpresstr, ressize);
SET_VARSIZE(xpres, ressize + VARHDRSZ); SET_VARSIZE(xpres, ressize + VARHDRSZ);
...@@ -659,8 +659,8 @@ xpath_table(PG_FUNCTION_ARGS) ...@@ -659,8 +659,8 @@ xpath_table(PG_FUNCTION_ARGS)
char **values; char **values;
xmlChar **xpaths; xmlChar **xpaths;
xmlChar *pos; char *pos;
xmlChar *pathsep = "|"; const char *pathsep = "|";
int numpaths; int numpaths;
int ret; int ret;
...@@ -738,7 +738,7 @@ xpath_table(PG_FUNCTION_ARGS) ...@@ -738,7 +738,7 @@ xpath_table(PG_FUNCTION_ARGS)
pos = xpathset; pos = xpathset;
do do
{ {
xpaths[numpaths] = pos; xpaths[numpaths] = (xmlChar *) pos;
pos = strstr(pos, pathsep); pos = strstr(pos, pathsep);
if (pos != NULL) if (pos != NULL)
{ {
...@@ -893,7 +893,7 @@ xpath_table(PG_FUNCTION_ARGS) ...@@ -893,7 +893,7 @@ xpath_table(PG_FUNCTION_ARGS)
default: default:
elog(NOTICE, "unsupported XQuery result: %d", res->type); elog(NOTICE, "unsupported XQuery result: %d", res->type);
resstr = xmlStrdup("<unsupported/>"); resstr = xmlStrdup((const xmlChar *) "<unsupported/>");
} }
...@@ -901,7 +901,7 @@ xpath_table(PG_FUNCTION_ARGS) ...@@ -901,7 +901,7 @@ xpath_table(PG_FUNCTION_ARGS)
* Insert this into the appropriate column in the * Insert this into the appropriate column in the
* result tuple. * result tuple.
*/ */
values[j + 1] = resstr; values[j + 1] = (char *) resstr;
} }
xmlXPathFreeContext(ctxt); xmlXPathFreeContext(ctxt);
} }
......
...@@ -102,7 +102,7 @@ xslt_process(PG_FUNCTION_ARGS) ...@@ -102,7 +102,7 @@ xslt_process(PG_FUNCTION_ARGS)
stylesheet = xsltParseStylesheetDoc(ssdoc); stylesheet = xsltParseStylesheetDoc(ssdoc);
} }
else else
stylesheet = xsltParseStylesheetFile(GET_STR(ssheet)); stylesheet = xsltParseStylesheetFile((xmlChar *) GET_STR(ssheet));
if (stylesheet == NULL) if (stylesheet == NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment