]> granicus.if.org Git - php/commitdiff
Nuke some warnings.
authorSascha Schumann <sas@php.net>
Sun, 13 May 2001 07:37:28 +0000 (07:37 +0000)
committerSascha Schumann <sas@php.net>
Sun, 13 May 2001 07:37:28 +0000 (07:37 +0000)
ext/session/mod_files.c
ext/session/session.c

index 8757715c33a151a17bac5d5dd7271ad5384f284c..bf0c74338d7b46beb462eb9e639a3ab5e44c1caf 100644 (file)
@@ -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);
index c55a12c342745e2029203f707223f2f0b4654b60..d737f841f2b84f3dea2414561eb31022d0d42c21 100644 (file)
@@ -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);