Skip to content

Commit

Permalink
regcomp_study.c: merged value only used under -DDEBUGGING
Browse files Browse the repository at this point in the history
For a non-debugging build this would warn with clang 17:

regcomp_study.c:1067:9: warning: variable 'merged' set but not used [-Wunused-but-set-variable]
 1067 |     U32 merged = 0;
      |         ^
  • Loading branch information
tonycoz committed Apr 18, 2024
1 parent be3876f commit 7be2e19
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion regcomp_study.c
Original file line number Diff line number Diff line change
Expand Up @@ -1064,9 +1064,9 @@ Perl_join_exact(pTHX_ RExC_state_t *pRExC_state, regnode *scan,
regnode *n = regnext(scan);
U32 stringok = 1;
regnode *next = REGNODE_AFTER_varies(scan);
U32 merged = 0;
U32 stopnow = 0;
#ifdef DEBUGGING
U32 merged = 0;
regnode *stop = scan;
DECLARE_AND_GET_RE_DEBUG_FLAGS;
#else
Expand Down Expand Up @@ -1214,7 +1214,9 @@ Perl_join_exact(pTHX_ RExC_state_t *pRExC_state, regnode *scan,
}

DEBUG_PEEP("merg", n, depth, 0);
#ifdef DEBUGGING
merged++;
#endif

next = REGNODE_AFTER_varies(n);
NEXT_OFF(scan) += NEXT_OFF(n);
Expand Down

0 comments on commit 7be2e19

Please sign in to comment.