1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2026-10-24 00:48:56 +03:00

regex-tests: pacify -Wformat-overflow

Problem and fix reported by Pádraig Brady in:
https://lists.gnu.org/r/bug-gnulib/2026-10/msg00072.html
* tests/test-regex-el.c (main): Use %c not %s.
This commit is contained in:
Paul Eggert
2026-10-13 22:44:46 -07:00
parent ba58165d92
commit 685bfe8e61
2 changed files with 8 additions and 1 deletions

View File

@@ -1,3 +1,10 @@
2026-10-13 Paul Eggert <eggert@cs.ucla.edu>
regex-tests: pacify -Wformat-overflow
Problem and fix reported by Pádraig Brady in:
https://lists.gnu.org/r/bug-gnulib/2026-10/msg00072.html
* tests/test-regex-el.c (main): Use %c not %s.
2026-10-12 Arno Onken <asnelt@asnelt.org>
regex: fold case in bracket fastmap only if RE_ICASE

View File

@@ -80,7 +80,7 @@ main ()
char pat[4];
char const *lbrack = &"["[k];
char const *rbrack = &"]"[k];
int patlen = sprintf (pat, "%s%s%s", lbrack, str[i], rbrack);
int patlen = sprintf (pat, "%s%c%s", lbrack, str[i][0], rbrack);
re_set_syntax (RE_ICASE);
memset (&regex, 0, sizeof regex);
s = re_compile_pattern (pat, patlen, &regex);