summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2001-05-13 07:37:28 +0000
committerSascha Schumann <sas@php.net>2001-05-13 07:37:28 +0000
commit90c2979144283da432f02e371b4b550fea5a7518 (patch)
tree7b27aea5e0f8b52155ae8f593bc0f3255b821785 /ext
parent4117324acf328a40aecb8d32400f6e828cade272 (diff)
downloadphp-git-90c2979144283da432f02e371b4b550fea5a7518.tar.gz
Nuke some warnings.
Diffstat (limited to 'ext')
-rw-r--r--ext/session/mod_files.c4
-rw-r--r--ext/session/session.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c
index 8757715c33..bf0c74338d 100644
--- a/ext/session/mod_files.c
+++ b/ext/session/mod_files.c
@@ -48,7 +48,7 @@ typedef struct {
char *lastkey;
char *basedir;
size_t basedir_len;
- int dirdepth;
+ size_t dirdepth;
size_t st_size;
} ps_files;
@@ -220,7 +220,7 @@ PS_OPEN_FUNC(files)
data->fd = -1;
if ((p = strchr(save_path, ';'))) {
- data->dirdepth = strtol(save_path, NULL, 10);
+ data->dirdepth = (size_t) strtol(save_path, NULL, 10);
save_path = p + 1;
}
data->basedir_len = strlen(save_path);
diff --git a/ext/session/session.c b/ext/session/session.c
index c55a12c342..d737f841f2 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -271,7 +271,7 @@ int php_get_session_var(char *name, size_t namelen, zval ***state_var PLS_DC PSL
PS_SERIALIZER_ENCODE_FUNC(php_binary)
{
zval *buf;
- char strbuf[MAX_STR + 1];
+ unsigned char strbuf[MAX_STR + 1];
php_serialize_data_t var_hash;
PS_ENCODE_VARS;
@@ -283,14 +283,14 @@ PS_SERIALIZER_ENCODE_FUNC(php_binary)
PS_ENCODE_LOOP(
if (key_length > PS_BIN_MAX) continue;
- strbuf[0] = key_length;
+ strbuf[0] = (unsigned char) key_length;
memcpy(strbuf + 1, key, key_length);
STR_CAT(buf, strbuf, key_length + 1);
php_var_serialize(buf, struc, &var_hash);
} else {
if (key_length > PS_BIN_MAX) continue;
- strbuf[0] = key_length & PS_BIN_UNDEF;
+ strbuf[0] = (unsigned char) key_length & PS_BIN_UNDEF;
memcpy(strbuf + 1, key, key_length);
STR_CAT(buf, strbuf, key_length + 1);