Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4608f35

Browse files
committed
Fix a passel of signed vs unsigned char warnings.
1 parentcfd6c89 commit4608f35

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

‎contrib/xml2/xpath.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ xml_encode_special_chars(PG_FUNCTION_ARGS)
209209

210210
pfree(ts);
211211

212-
ressize=strlen(tt);
212+
ressize=strlen((char*)tt);
213213
tout= (text*)palloc(ressize+VARHDRSZ);
214214
memcpy(VARDATA(tout),tt,ressize);
215215
SET_VARSIZE(tout,ressize+VARHDRSZ);
@@ -265,7 +265,7 @@ pgxmlNodeSetToText(xmlNodeSetPtr nodeset,
265265

266266
/* If this isn't the last entry, write the plain sep. */
267267
if (i< (nodeset->nodeNr)-1)
268-
xmlBufferWriteChar(buf,plainsep);
268+
xmlBufferWriteChar(buf,(char*)plainsep);
269269
}
270270
else
271271
{
@@ -604,12 +604,12 @@ pgxml_result_to_text(xmlXPathObjectPtr res,
604604

605605
default:
606606
elog(NOTICE,"unsupported XQuery result: %d",res->type);
607-
xpresstr=xmlStrdup("<unsupported/>");
607+
xpresstr=xmlStrdup((constxmlChar*)"<unsupported/>");
608608
}
609609

610610

611611
/* Now convert this result back to text */
612-
ressize=strlen(xpresstr);
612+
ressize=strlen((char*)xpresstr);
613613
xpres= (text*)palloc(ressize+VARHDRSZ);
614614
memcpy(VARDATA(xpres),xpresstr,ressize);
615615
SET_VARSIZE(xpres,ressize+VARHDRSZ);
@@ -659,8 +659,8 @@ xpath_table(PG_FUNCTION_ARGS)
659659

660660
char**values;
661661
xmlChar**xpaths;
662-
xmlChar*pos;
663-
xmlChar*pathsep="|";
662+
char*pos;
663+
constchar*pathsep="|";
664664

665665
intnumpaths;
666666
intret;
@@ -738,7 +738,7 @@ xpath_table(PG_FUNCTION_ARGS)
738738
pos=xpathset;
739739
do
740740
{
741-
xpaths[numpaths]=pos;
741+
xpaths[numpaths]=(xmlChar*)pos;
742742
pos=strstr(pos,pathsep);
743743
if (pos!=NULL)
744744
{
@@ -893,15 +893,15 @@ xpath_table(PG_FUNCTION_ARGS)
893893

894894
default:
895895
elog(NOTICE,"unsupported XQuery result: %d",res->type);
896-
resstr=xmlStrdup("<unsupported/>");
896+
resstr=xmlStrdup((constxmlChar*)"<unsupported/>");
897897
}
898898

899899

900900
/*
901901
* Insert this into the appropriate column in the
902902
* result tuple.
903903
*/
904-
values[j+1]=resstr;
904+
values[j+1]=(char*)resstr;
905905
}
906906
xmlXPathFreeContext(ctxt);
907907
}

‎contrib/xml2/xslt_proc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ xslt_process(PG_FUNCTION_ARGS)
102102
stylesheet=xsltParseStylesheetDoc(ssdoc);
103103
}
104104
else
105-
stylesheet=xsltParseStylesheetFile(GET_STR(ssheet));
105+
stylesheet=xsltParseStylesheetFile((xmlChar*)GET_STR(ssheet));
106106

107107

108108
if (stylesheet==NULL)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp