diff options
author | Daniel Llorens <lloda@sarc.name> | 2021-08-16 13:23:27 +0200 |
---|---|---|
committer | Daniel Llorens <lloda@sarc.name> | 2021-08-16 13:23:27 +0200 |
commit | b4a80f4239b19fea4d2cc3e9d197f24b809f0624 (patch) | |
tree | b4dc728ec96391e302df4f7c733bf592a3976ff2 /lib/regex_internal.c | |
parent | 5df5555d12f1408a66a5368a918abb981edf5445 (diff) | |
download | guile-b4a80f4239b19fea4d2cc3e9d197f24b809f0624.tar.gz |
Update gnulib to 8f4538a53d64054ae2fc8b86c0f87c418c6176e6
Includes gnulib:0c907f7da13232908f05c415b8cec56024071906 to fix #49930
https://lists.gnu.org/archive/html/bug-guile/2021-08/msg00003.html.
Diffstat (limited to 'lib/regex_internal.c')
-rw-r--r-- | lib/regex_internal.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/regex_internal.c b/lib/regex_internal.c index 55f6b66de..aefcfa2f5 100644 --- a/lib/regex_internal.c +++ b/lib/regex_internal.c @@ -1211,6 +1211,10 @@ re_node_set_merge (re_node_set *dest, const re_node_set *src) if (__glibc_unlikely (dest->nelem == 0)) { + /* Although we already guaranteed above that dest->alloc != 0 and + therefore dest->elems != NULL, add a debug assertion to pacify + GCC 11.2.1's -fanalyzer. */ + DEBUG_ASSERT (dest->elems); dest->nelem = src->nelem; memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx)); return REG_NOERROR; @@ -1286,7 +1290,10 @@ re_node_set_insert (re_node_set *set, Idx elem) if (__glibc_unlikely (set->nelem) == 0) { - /* We already guaranteed above that set->alloc != 0. */ + /* Although we already guaranteed above that set->alloc != 0 and + therefore set->elems != NULL, add a debug assertion to pacify + GCC 11.2 -fanalyzer. */ + DEBUG_ASSERT (set->elems); set->elems[0] = elem; ++set->nelem; return true; |