Skip to content

Commit 196a817

Browse files
committed
Fix [-Wimplicit-fallthrough] warnings in libxml extension
1 parent 7294559 commit 196a817

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ext/libxml/libxml.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ static void php_libxml_node_free(xmlNodePtr node)
165165
node->ns = NULL;
166166
}
167167
node->type = XML_ELEMENT_NODE;
168+
fallthrough;
168169
default:
169170
xmlFreeNode(node);
170171
}
@@ -188,9 +189,10 @@ PHP_LIBXML_API void php_libxml_node_free_list(xmlNodePtr node)
188189
php_libxml_node_free_list((xmlNodePtr) node->properties);
189190
break;
190191
case XML_ATTRIBUTE_NODE:
191-
if ((node->doc != NULL) && (((xmlAttrPtr) node)->atype == XML_ATTRIBUTE_ID)) {
192-
xmlRemoveID(node->doc, (xmlAttrPtr) node);
193-
}
192+
if ((node->doc != NULL) && (((xmlAttrPtr) node)->atype == XML_ATTRIBUTE_ID)) {
193+
xmlRemoveID(node->doc, (xmlAttrPtr) node);
194+
}
195+
fallthrough;
194196
case XML_ATTRIBUTE_DECL:
195197
case XML_DTD_NODE:
196198
case XML_DOCUMENT_TYPE_NODE:

0 commit comments

Comments
 (0)