Skip to content

Commit

Permalink
Fix unused-but-set-variable warning in hebrev()
Browse files Browse the repository at this point in the history
  • Loading branch information
nikic committed Jul 28, 2022
1 parent 40af94a commit 6ff662b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions ext/standard/string.c
Original file line number Diff line number Diff line change
Expand Up @@ -4386,7 +4386,7 @@ PHP_FUNCTION(hebrev)
{
char *str, *heb_str, *target;
const char *tmp;
size_t block_start, block_end, block_type, block_length, i;
size_t block_start, block_end, block_type, i;
zend_long max_chars=0, char_count;
size_t begin, end, orig_begin;
size_t str_len;
Expand All @@ -4410,8 +4410,6 @@ PHP_FUNCTION(hebrev)
*target = 0;
target--;

block_length=0;

if (isheb(*tmp)) {
block_type = _HEB_BLOCK_TYPE_HEB;
} else {
Expand All @@ -4423,7 +4421,6 @@ PHP_FUNCTION(hebrev)
while ((isheb((int)*(tmp+1)) || _isblank((int)*(tmp+1)) || ispunct((int)*(tmp+1)) || (int)*(tmp+1)=='\n' ) && block_end<str_len-1) {
tmp++;
block_end++;
block_length++;
}
for (i = block_start+1; i<= block_end+1; i++) {
*target = str[i-1];
Expand Down Expand Up @@ -4468,7 +4465,6 @@ PHP_FUNCTION(hebrev)
while (!isheb(*(tmp+1)) && (int)*(tmp+1)!='\n' && block_end < str_len-1) {
tmp++;
block_end++;
block_length++;
}
while ((_isblank((int)*tmp) || ispunct((int)*tmp)) && *tmp!='/' && *tmp!='-' && block_end > block_start) {
tmp--;
Expand Down

0 comments on commit 6ff662b

Please sign in to comment.