* lib/dfa.c (lex): Use ‘assume’ rather than ‘abort’,
to try to pacify Coverity.
(maybe_disable_superset_dfa): Use ‘assume’ here too, for consistency.
Using ‘assume’ should make the code a tiny bit faster, though
at the cost of having undefined behavior instead of nicely aborting.
+2024-05-20 Paul Eggert <eggert@cs.ucla.edu>
+
+ dfa: attempt to pacify Coverity
+ * lib/dfa.c (lex): Use ‘assume’ rather than ‘abort’,
+ to try to pacify Coverity.
+ (maybe_disable_superset_dfa): Use ‘assume’ here too, for consistency.
+ Using ‘assume’ should make the code a tiny bit faster, though
+ at the cost of having undefined behavior instead of nicely aborting.
+
2024-05-20 Bruno Haible <bruno@clisp.org>
Make it easy to generate debug info for libbacktrace on macOS.
{
/* This loop should consume at most a backslash and some other
character. */
- if (2 <= i)
- abort ();
+ assume (i < 2);
if (! dfa->lex.left)
return dfa->lex.lasttok = END;
{
case ANYCHAR:
/* Lowered. */
- abort ();
+ assume (false);
case BACKREF:
have_backref = true;
break;