diff options
| author | STANLEY SUFFICOOL <ssufficool@php.net> | 2014-10-24 20:00:48 -0700 |
|---|---|---|
| committer | STANLEY SUFFICOOL <ssufficool@php.net> | 2014-10-24 20:00:48 -0700 |
| commit | e33ba844e52c5dc8e2fb1658a51bec611e78f7ba (patch) | |
| tree | 2e6f416aac4b0a5668976db500ada1bdcc2b399e /ext/standard/string.c | |
| parent | 5f91b0a3c717f109ffb7dc684d5a3fa8905b82ec (diff) | |
| parent | 0a5b7d1316a778dc06a638869c8df8d4c989ddf0 (diff) | |
| download | php-git-e33ba844e52c5dc8e2fb1658a51bec611e78f7ba.tar.gz | |
Merge branch 'master' of https://git.php.net/push/php-src
* 'master' of https://git.php.net/push/php-src: (164 commits)
refix the broken place
fix infinite loop
fix datatype mismatch warnings
fix datatype mismatches
fix datatype mismatches
fix datatype mismatches
fix datatype mismatch warnings
fix datatype mismatch warnings
fix datatype mismatch warnings
fix datatype mismatch warning
fix datatype mismatches
fix datatype mismatch warnings
Re-add phpdbg to travis
Added some NEWS
Make xml valid (missing space between attrs)
Fix info classes file name in xml
Add note about <eval> tag for errors in xml.md
Name the tag <eval> if the error id during ev cmd
Do not print out xml as PHP print...
Fix output to wrong function
...
Diffstat (limited to 'ext/standard/string.c')
| -rw-r--r-- | ext/standard/string.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c index e757821813..152ae6d66f 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -2764,20 +2764,20 @@ PHP_FUNCTION(ucwords) PHPAPI char *php_strtr(char *str, size_t len, char *str_from, char *str_to, size_t trlen) { size_t i; - unsigned char xlat[256]; + unsigned char xlat[256], j = 0; if ((trlen < 1) || (len < 1)) { return str; } - for (i = 0; i < 256; xlat[i] = i, i++); + do { xlat[j] = j; } while (++j != 0); for (i = 0; i < trlen; i++) { - xlat[(unsigned char) str_from[i]] = str_to[i]; + xlat[(size_t)(unsigned char) str_from[i]] = str_to[i]; } for (i = 0; i < len; i++) { - str[i] = xlat[(unsigned char) str[i]]; + str[i] = xlat[(size_t)(unsigned char) str[i]]; } return str; @@ -4183,7 +4183,7 @@ PHP_FUNCTION(setlocale) #ifdef HAVE_SETLOCALE if (Z_TYPE_P(pcategory) == IS_LONG) { - cat = Z_LVAL_P(pcategory); + cat = (int)Z_LVAL_P(pcategory); } else { /* FIXME: The following behaviour should be removed. */ char *category; @@ -4894,14 +4894,14 @@ PHP_FUNCTION(localeconv) localeconv_r( &currlocdata ); /* Grab the grouping data out of the array */ - len = strlen(currlocdata.grouping); + len = (int)strlen(currlocdata.grouping); for (i = 0; i < len; i++) { add_index_long(&grouping, i, currlocdata.grouping[i]); } /* Grab the monetary grouping data out of the array */ - len = strlen(currlocdata.mon_grouping); + len = (int)strlen(currlocdata.mon_grouping); for (i = 0; i < len; i++) { add_index_long(&mon_grouping, i, currlocdata.mon_grouping[i]); @@ -5344,7 +5344,7 @@ PHP_FUNCTION(str_split) return; } - array_init_size(return_value, ((str->len - 1) / split_length) + 1); + array_init_size(return_value, (uint32_t)(((str->len - 1) / split_length) + 1)); n_reg_segments = str->len / split_length; p = str->val; |
