4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-28 03:27:46 +08:00

Cygwin: regex: fix build errors

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2023-03-16 11:20:11 +01:00
parent 24f34edc2a
commit 988c304ec2

View File

@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$");
#include "collate.h" #include "collate.h"
#endif #endif
#include "winsup.h"
#include "utils.h" #include "utils.h"
#include "regex2.h" #include "regex2.h"
@ -932,7 +933,7 @@ p_simp_re(struct parse *p, struct branchc *bc)
* appears otherwise. * appears otherwise.
*/ */
(void)REQUIRE(bc->nchain == 0, REG_BADRPT); (void)REQUIRE(bc->nchain == 0, REG_BADRPT);
/* FALLTHROUGH */ fallthrough;
default: default:
if (p->error != 0) if (p->error != 0)
return (false); /* Definitely not $... */ return (false); /* Definitely not $... */
@ -1170,13 +1171,13 @@ p_b_pseudoclass(struct parse *p, char c) {
switch (c) { switch (c) {
case 'W': case 'W':
cs->invert = 1; cs->invert = 1;
/* PASSTHROUGH */ fallthrough;
case 'w': case 'w':
p_b_cclass_named(p, cs, "alnum"); p_b_cclass_named(p, cs, "alnum");
break; break;
case 'S': case 'S':
cs->invert = 1; cs->invert = 1;
/* PASSTHROUGH */ fallthrough;
case 's': case 's':
p_b_cclass_named(p, cs, "space"); p_b_cclass_named(p, cs, "space");
break; break;
@ -1854,7 +1855,7 @@ findmust(struct parse *p, struct re_guts *g)
* UTF-8 (see RFC 3629). * UTF-8 (see RFC 3629).
*/ */
if (MB_CUR_MAX > 1 && if (MB_CUR_MAX > 1 &&
strcmp(_CurrentRuneLocale->__encoding, "UTF-8") != 0) strcmp(__current_locale_charset (), "UTF-8") != 0)
return; return;
/* find the longest OCHAR sequence in strip */ /* find the longest OCHAR sequence in strip */
@ -1893,7 +1894,7 @@ findmust(struct parse *p, struct re_guts *g)
return; return;
} }
} while (OP(s) != (sop)O_QUEST && OP(s) != (sop)O_CH); } while (OP(s) != (sop)O_QUEST && OP(s) != (sop)O_CH);
/* FALLTHROUGH */ fallthrough;
case OBOW: /* things that break a sequence */ case OBOW: /* things that break a sequence */
case OEOW: case OEOW:
case OBOL: case OBOL: