1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

Fix -Wimplicit-fallthrough warnings

Add "falls through" comments to quench implicit-fallthrough warnings
which are enabled by -Wextra under GCC 7.
This commit is contained in:
J. Peter Mugaas
2017-10-21 13:49:31 +02:00
committed by Nick Wellnhofer
parent bec3c17fae
commit d2c329a9a4
11 changed files with 49 additions and 7 deletions

View File

@ -2810,18 +2810,21 @@ xmlRegCheckCharacterRange(xmlRegAtomType type, int codepoint, int neg,
break;
case XML_REGEXP_NOTSPACE:
neg = !neg;
/* Falls through. */
case XML_REGEXP_ANYSPACE:
ret = ((codepoint == '\n') || (codepoint == '\r') ||
(codepoint == '\t') || (codepoint == ' '));
break;
case XML_REGEXP_NOTINITNAME:
neg = !neg;
/* Falls through. */
case XML_REGEXP_INITNAME:
ret = (IS_LETTER(codepoint) ||
(codepoint == '_') || (codepoint == ':'));
break;
case XML_REGEXP_NOTNAMECHAR:
neg = !neg;
/* Falls through. */
case XML_REGEXP_NAMECHAR:
ret = (IS_LETTER(codepoint) || IS_DIGIT(codepoint) ||
(codepoint == '.') || (codepoint == '-') ||
@ -2830,11 +2833,13 @@ xmlRegCheckCharacterRange(xmlRegAtomType type, int codepoint, int neg,
break;
case XML_REGEXP_NOTDECIMAL:
neg = !neg;
/* Falls through. */
case XML_REGEXP_DECIMAL:
ret = xmlUCSIsCatNd(codepoint);
break;
case XML_REGEXP_REALCHAR:
neg = !neg;
/* Falls through. */
case XML_REGEXP_NOTREALCHAR:
ret = xmlUCSIsCatP(codepoint);
if (ret == 0)