1 diff --git c/lib/regcomp.c i/lib/regcomp.c
2 index 6472ff6..665b2ab 100644
6 with this program; if not, write to the Free Software Foundation,
7 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
11 static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern,
12 size_t length, reg_syntax_t syntax);
13 static void re_compile_fastmap_iter (regex_t *bufp,
14 @@ -541,7 +543,7 @@ regerror (errcode, preg, errbuf, errbuf_size)
16 #else /* size_t might promote */
18 -regerror (int errcode, const regex_t *_Restrict_ preg,
19 +regerror (int errcode, const regex_t *_Restrict_ preg _UNUSED_PARAMETER_,
20 char *_Restrict_ errbuf, size_t errbuf_size)
23 @@ -1375,7 +1377,7 @@ calc_first (void *extra, bin_tree_t *node)
25 /* Pass 2: compute NEXT on the tree. Preorder visit. */
27 -calc_next (void *extra, bin_tree_t *node)
28 +calc_next (void *extra _UNUSED_PARAMETER_, bin_tree_t *node)
30 switch (node->token.type)
32 @@ -2571,7 +2573,8 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
33 /* This loop is actually executed only when end != REG_MISSING,
34 to rewrite <re>{0,n} as (<re>(<re>...<re>?)?)?... We have
35 already created the start+1-th copy. */
36 - if ((Idx) -1 < 0 || end != REG_MISSING)
37 + verify (! TYPE_SIGNED (Idx));
38 + if (end != REG_MISSING)
39 for (i = start + 2; i <= end; ++i)
41 elem = duplicate_tree (elem, dfa);
42 @@ -2731,7 +2734,8 @@ static reg_errcode_t
44 build_collating_symbol (bitset_t sbcset,
45 # ifdef RE_ENABLE_I18N
46 - re_charset_t *mbcset, Idx *coll_sym_alloc,
47 + re_charset_t *mbcset _UNUSED_PARAMETER_,
48 + Idx *coll_sym_alloc _UNUSED_PARAMETER_,
50 const unsigned char *name)
52 @@ -3309,7 +3313,8 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
55 parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp,
56 - re_token_t *token, int token_len, re_dfa_t *dfa,
57 + re_token_t *token, int token_len,
58 + re_dfa_t *dfa _UNUSED_PARAMETER_,
59 reg_syntax_t syntax, bool accept_hyphen)
62 @@ -3396,8 +3401,9 @@ parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp,
66 -build_equiv_class (bitset_t sbcset, re_charset_t *mbcset,
67 - Idx *equiv_class_alloc, const unsigned char *name)
68 +build_equiv_class (bitset_t sbcset, re_charset_t *mbcset _UNUSED_PARAMETER_,
69 + Idx *equiv_class_alloc _UNUSED_PARAMETER_,
70 + const unsigned char *name)
71 #else /* not RE_ENABLE_I18N */
72 build_equiv_class (bitset_t sbcset, const unsigned char *name)
73 #endif /* not RE_ENABLE_I18N */
74 @@ -3798,7 +3804,7 @@ free_token (re_token_t *node)
78 -free_tree (void *extra, bin_tree_t *node)
79 +free_tree (void *extra _UNUSED_PARAMETER_, bin_tree_t *node)
81 free_token (&node->token);