summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2005-08-12 13:10:17 +0000
committerJim Meyering <jim@meyering.net>2005-08-12 13:10:17 +0000
commitd7d1532698ff183a06cef3fdf590ccef4f6dc08d (patch)
tree1680d47da4c4f8ecc34192083e2225f229a2ef25 /lib
parent39a33e5f6460fae371e16243d759c41540c21a88 (diff)
downloadcoreutils-d7d1532698ff183a06cef3fdf590ccef4f6dc08d.tar.xz
(duplicate_node) [lint]: Set *new_idx to -1, to avoid
warnings (unfounded) in caller that it may be used uninitialized.
Diffstat (limited to 'lib')
-rw-r--r--lib/regcomp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/regcomp.c b/lib/regcomp.c
index ea9393405..c0541f324 100644
--- a/lib/regcomp.c
+++ b/lib/regcomp.c
@@ -1603,7 +1603,10 @@ duplicate_node (new_idx, dfa, org_idx, constraint)
{
int dup_idx = re_dfa_add_node (dfa, dfa->nodes[org_idx]);
if (BE (dup_idx == -1, 0))
- return REG_ESPACE;
+ {
+ IF_LINT (*new_idx = -1);
+ return REG_ESPACE;
+ }
dfa->nodes[dup_idx].constraint = constraint;
if (dfa->nodes[org_idx].type == ANCHOR)
dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].opr.ctx_type;