1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-10 08:58:16 +03:00

Fix -Wenum-compare warnings

Also fixes a serious bug in xmlXPtrNewRangeNodePoint.
This commit is contained in:
Nick Wellnhofer 2017-11-13 21:23:17 +01:00
parent 359e750482
commit b21895717d
2 changed files with 1 additions and 3 deletions

View File

@ -12386,7 +12386,7 @@ xmlXPathNodeCollectAndTest(xmlXPathParserContextPtr ctxt,
default:
break;
}
} else if (cur->type == type) {
} else if (cur->type == (xmlElementType) type) {
if (cur->type == XML_NAMESPACE_DECL)
XP_TEST_HIT_NS
else

View File

@ -467,8 +467,6 @@ xmlXPtrNewRangeNodePoint(xmlNodePtr start, xmlXPathObjectPtr end) {
return(NULL);
if (end == NULL)
return(NULL);
if (start->type != XPATH_POINT)
return(NULL);
if (end->type != XPATH_POINT)
return(NULL);