mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-06-15 05:56:55 +02:00
(duplicate_node) [lint]: Set *new_idx to -1, to avoid
warnings (unfounded) in caller that it may be used uninitialized.
This commit is contained in:
+4
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user