summaryrefslogtreecommitdiff
path: root/ext/pcre/php_pcre.c
diff options
context:
space:
mode:
authorNuno Lopes <nlopess@php.net>2008-09-02 19:10:38 +0000
committerNuno Lopes <nlopess@php.net>2008-09-02 19:10:38 +0000
commit1e3ebc2373d1d7f6020fa1d7ffa9349ac8c78697 (patch)
tree8eccf644394d99c35ecc5a6b3b8e73b646d1597b /ext/pcre/php_pcre.c
parent51eb7f5de98050c6395d660cd7c13a968127093d (diff)
downloadphp-git-1e3ebc2373d1d7f6020fa1d7ffa9349ac8c78697.tar.gz
kill dead variables. found by LLVM's clang static analyzer
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r--ext/pcre/php_pcre.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index 63012dc1c6..12f94800bd 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -532,7 +532,6 @@ PHPAPI void php_pcre_match_impl(pcre_cache_entry *pce, char *subject, int subjec
int matched; /* Has anything matched */
int g_notempty = 0; /* If the match should not be empty */
const char **stringlist; /* Holds list of subpatterns */
- char *match; /* The current match */
char **subpat_names; /* Array for named subpatterns */
int i, rc;
int subpats_order; /* Order of subpattern matches */
@@ -611,7 +610,6 @@ PHPAPI void php_pcre_match_impl(pcre_cache_entry *pce, char *subject, int subjec
}
}
- match = NULL;
matched = 0;
PCRE_G(error_code) = PHP_PCRE_NO_ERROR;
@@ -632,7 +630,6 @@ PHPAPI void php_pcre_match_impl(pcre_cache_entry *pce, char *subject, int subjec
/* If something has matched */
if (count > 0) {
matched++;
- match = subject + offsets[0];
/* If subpatterns array has been passed, fill it in with values. */
if (subpats != NULL) {
@@ -1451,8 +1448,7 @@ PHPAPI void php_pcre_split_impl(pcre_cache_entry *pce, char *subject, int subjec
int start_offset; /* Where the new search starts */
int next_offset; /* End of the last delimiter match + 1 */
int g_notempty = 0; /* If the match should not be empty */
- char *match, /* The current match */
- *last_match; /* Location of last match */
+ char *last_match; /* Location of last match */
int rc;
int no_empty; /* If NO_EMPTY flag is set */
int delim_capture; /* If delimiters should be captured */
@@ -1489,7 +1485,6 @@ PHPAPI void php_pcre_split_impl(pcre_cache_entry *pce, char *subject, int subjec
start_offset = 0;
next_offset = 0;
last_match = subject;
- match = NULL;
PCRE_G(error_code) = PHP_PCRE_NO_ERROR;
/* Get next piece if no limit or limit not yet reached and something matched*/
@@ -1509,8 +1504,6 @@ PHPAPI void php_pcre_split_impl(pcre_cache_entry *pce, char *subject, int subjec
/* If something matched */
if (count > 0) {
- match = subject + offsets[0];
-
if (!no_empty || &subject[offsets[0]] != last_match) {
if (offset_capture) {