cvs: php4 /ext/session mod_files.c session.c
| From: | Sascha Schumann | Date: | Sun, 13 May 2001 07:37:28 +0000 |
| Subject: | cvs: php4 /ext/session mod_files.c session.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-5716@lists.php.net to get a copy of this message | ||
sas Sun May 13 00:37:28 2001 EDT
Modified files:
/php4/ext/session mod_files.c session.c
Log:
Nuke some warnings.
Index: php4/ext/session/mod_files.c
diff -u php4/ext/session/mod_files.c:1.55 php4/ext/session/mod_files.c:1.56
--- php4/ext/session/mod_files.c:1.55 Sat May 12 01:39:33 2001
+++ php4/ext/session/mod_files.c Sun May 13 00:37:28 2001
@@ -48,7 +48,7 @@
char *lastkey;
char *basedir;
size_t basedir_len;
- int dirdepth;
+ size_t dirdepth;
size_t st_size;
} ps_files;
@@ -220,7 +220,7 @@
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);
Index: php4/ext/session/session.c
diff -u php4/ext/session/session.c:1.201 php4/ext/session/session.c:1.202
--- php4/ext/session/session.c:1.201 Thu May 3 08:48:49 2001
+++ php4/ext/session/session.c Sun May 13 00:37:28 2001
@@ -271,7 +271,7 @@
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_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);