nlopess Tue Sep 2 19:10:39 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/pcre php_pcre.c Log: kill dead variables. found by LLVM's clang static analyzer http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/php_pcre.c?r1=1.168.2.9.2.21.2.22&r2=1.168.2.9.2.21.2.23&diff_format=u Index: php-src/ext/pcre/php_pcre.c diff -u php-src/ext/pcre/php_pcre.c:1.168.2.9.2.21.2.22 php-src/ext/pcre/php_pcre.c:1.168.2.9.2.21.2.23 --- php-src/ext/pcre/php_pcre.c:1.168.2.9.2.21.2.22 Fri Aug 29 12:13:54 2008 +++ php-src/ext/pcre/php_pcre.c Tue Sep 2 19:10:38 2008 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pcre.c,v 1.168.2.9.2.21.2.22 2008/08/29 12:13:54 helly Exp $ */ +/* $Id: php_pcre.c,v 1.168.2.9.2.21.2.23 2008/09/02 19:10:38 nlopess Exp $ */ #include "php.h" #include "php_ini.h" @@ -532,7 +532,6 @@ 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 @@ } } - match = NULL; matched = 0; PCRE_G(error_code) = PHP_PCRE_NO_ERROR; @@ -632,7 +630,6 @@ /* 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 @@ 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 @@ 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 @@ /* If something matched */ if (count > 0) { - match = subject + offsets[0]; - if (!no_empty || &subject[offsets[0]] != last_match) { if (offset_capture) {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php