summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/standard/array.c4
-rw-r--r--ext/standard/cyr_convert.c4
-rw-r--r--ext/standard/exec.c4
-rw-r--r--ext/standard/url_scanner_ex.re2
4 files changed, 7 insertions, 7 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c
index 32a0edde6e..17cb9471f5 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -1174,12 +1174,12 @@ static int php_valid_var_name(char *var_name)
len = strlen(var_name);
- if (!isalpha((int)var_name[0]) && var_name[0] != '_')
+ if (!isalpha((int)((unsigned char *)var_name)[0]) && var_name[0] != '_')
return 0;
if (len > 1) {
for (i=1; i<len; i++) {
- if (!isalnum((int)var_name[i]) && var_name[i] != '_') {
+ if (!isalnum((int)((unsigned char *)var_name)[i]) && var_name[i] != '_') {
return 0;
}
}
diff --git a/ext/standard/cyr_convert.c b/ext/standard/cyr_convert.c
index 086bbe383b..ed333b42f8 100644
--- a/ext/standard/cyr_convert.c
+++ b/ext/standard/cyr_convert.c
@@ -210,7 +210,7 @@ static char * php_convert_cyr_string(unsigned char *str, int length, char from,
from_table = NULL;
to_table = NULL;
- switch (toupper(from))
+ switch (toupper((int)(unsigned char)from))
{
case 'W':
from_table = _cyr_win1251;
@@ -232,7 +232,7 @@ static char * php_convert_cyr_string(unsigned char *str, int length, char from,
break;
}
- switch (toupper(to))
+ switch (toupper((int)(unsigned char)to))
{
case 'W':
to_table = _cyr_win1251;
diff --git a/ext/standard/exec.c b/ext/standard/exec.c
index 7d17c8e00f..da7a854d29 100644
--- a/ext/standard/exec.c
+++ b/ext/standard/exec.c
@@ -134,7 +134,7 @@ int php_exec(int type, char *cmd, pval *array, pval *return_value TSRMLS_DC)
} else if (type == 2) {
/* strip trailing whitespaces */
l = bufl;
- while (l-- && isspace(buf[l]));
+ while (l-- && isspace(((unsigned char *)buf)[l]));
if (l != (bufl - 1)) {
bufl = l + 1;
buf[bufl] = '\0';
@@ -147,7 +147,7 @@ int php_exec(int type, char *cmd, pval *array, pval *return_value TSRMLS_DC)
/* strip trailing whitespaces if we have not done so already */
if (type != 2) {
l = bufl;
- while (l-- && isspace(buf[l]));
+ while (l-- && isspace(((unsigned char *)buf)[l]));
if (l != (bufl - 1)) {
bufl = l + 1;
buf[bufl] = '\0';
diff --git a/ext/standard/url_scanner_ex.re b/ext/standard/url_scanner_ex.re
index a22bc7a2bf..7f85c06b38 100644
--- a/ext/standard/url_scanner_ex.re
+++ b/ext/standard/url_scanner_ex.re
@@ -236,7 +236,7 @@ static inline void handle_tag(STD_PARA)
ctx->tag.len = 0;
smart_str_appendl(&ctx->tag, start, YYCURSOR - start);
for (i = 0; i < ctx->tag.len; i++)
- ctx->tag.c[i] = tolower(ctx->tag.c[i]);
+ ctx->tag.c[i] = tolower((int)(unsigned char)ctx->tag.c[i]);
if (zend_hash_find(ctx->tags, ctx->tag.c, ctx->tag.len, (void **) &ctx->lookup_data) == SUCCESS)
ok = 1;
STATE = ok ? STATE_NEXT_ARG : STATE_PLAIN;