Skip to content

Commit fc1b4f2

Browse files
authored
Remove some dead assignments to silence Clang analyzer
1 parent ce692c0 commit fc1b4f2

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/pcre2_compile.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7135,7 +7135,6 @@ for (;; pptr++)
71357135
generated in the pre-pass in order to get a number and whether or not
71367136
this name is duplicated. */
71377137

7138-
groupnumber = 0;
71397138
ng = PRIV(compile_find_named_group)(name, length, cb);
71407139

71417140
if (ng == NULL)

src/pcre2test_inc.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,7 @@ static int
10581058
pattern_info(int what, void *where, BOOL unsetok)
10591059
{
10601060
int rc;
1061-
rc = pcre2_pattern_info(compiled_code, what, NULL); /* Exercise the code */
1061+
(void)pcre2_pattern_info(compiled_code, what, NULL); /* Exercise the code */
10621062
rc = pcre2_pattern_info(compiled_code, what, where);
10631063
if (rc >= 0) return 0;
10641064
if (rc != PCRE2_ERROR_UNSET || !unsetok)
@@ -4756,7 +4756,7 @@ for (gmatched = 0;; gmatched++)
47564756
start_time = clock();
47574757
for (i = 0; i < timeitm; i++)
47584758
{
4759-
capcount = pcre2_dfa_match(compiled_code, pp, arg_ulen,
4759+
(void)pcre2_dfa_match(compiled_code, pp, arg_ulen,
47604760
dat_datctl.offset, dat_datctl.options | g_notempty, match_data,
47614761
use_dat_context, dfa_workspace, DFA_WS_DIMENSION);
47624762
}
@@ -4767,7 +4767,7 @@ for (gmatched = 0;; gmatched++)
47674767
start_time = clock();
47684768
for (i = 0; i < timeitm; i++)
47694769
{
4770-
capcount = pcre2_jit_match(compiled_code, pp, arg_ulen,
4770+
(void)pcre2_jit_match(compiled_code, pp, arg_ulen,
47714771
dat_datctl.offset, dat_datctl.options | g_notempty, match_data,
47724772
use_dat_context);
47734773
}
@@ -4778,7 +4778,7 @@ for (gmatched = 0;; gmatched++)
47784778
start_time = clock();
47794779
for (i = 0; i < timeitm; i++)
47804780
{
4781-
capcount = pcre2_match(compiled_code, pp, arg_ulen,
4781+
(void)pcre2_match(compiled_code, pp, arg_ulen,
47824782
dat_datctl.offset, dat_datctl.options | g_notempty, match_data,
47834783
use_dat_context);
47844784
}

0 commit comments

Comments
 (0)