From: Paul Eggert Date: Tue, 15 Apr 2025 20:50:32 +0000 (-0700) Subject: dfa: pacify gcc -Wstringop-overflow X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=60d9b4134f8661dc25134dbe54be15f6138718c8;p=gnulib.git dfa: pacify gcc -Wstringop-overflow Problem reported by Christian Hesse in: https://bugs.gnu.org/77828 * lib/dfa.c (dfaanalyze): Pacify gcc -flto -Wstringop-overflow. --- diff --git a/ChangeLog b/ChangeLog index 7d255be3a2..28322a2655 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2025-04-15 Paul Eggert + + dfa: pacify gcc -Wstringop-overflow + Problem reported by Christian Hesse in: + https://bugs.gnu.org/77828 + * lib/dfa.c (dfaanalyze): Pacify gcc -flto -Wstringop-overflow. + 2025-04-15 Bruno Haible gnulib-tool.py: Fix exception during --update with changed macro-prefix. diff --git a/lib/dfa.c b/lib/dfa.c index 684043dd8f..cbacdc04cf 100644 --- a/lib/dfa.c +++ b/lib/dfa.c @@ -2699,6 +2699,7 @@ dfaanalyze (struct dfa *d, bool searchflag) addtok (d, CAT); idx_t tindex = d->tindex; + assume (0 < tindex); #ifdef DEBUG fprintf (stderr, "dfaanalyze:\n");