iliaa           Thu Jul 13 00:13:42 2006 UTC

  Modified files:              
    /php-src/ext/session        session.c 
  Log:
  MFB: Fixed compiler warnings.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.438&r2=1.439&diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.438 php-src/ext/session/session.c:1.439
--- php-src/ext/session/session.c:1.438 Wed Jul 12 15:28:18 2006
+++ php-src/ext/session/session.c       Thu Jul 13 00:13:42 2006
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: session.c,v 1.438 2006/07/12 15:28:18 mike Exp $ */
+/* $Id: session.c,v 1.439 2006/07/13 00:13:42 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -360,7 +360,7 @@
                
                if (has_value) {
                        ALLOC_INIT_ZVAL(current);
-                       if (php_var_unserialize(&current, (const unsigned char 
**) &p, endptr, &var_hash TSRMLS_CC)) {
+                       if (php_var_unserialize(&current, (const unsigned char 
**) &p, (const unsigned char *) endptr, &var_hash TSRMLS_CC)) {
                                php_set_session_var(name, namelen, current, 
&var_hash  TSRMLS_CC);
                        }
                        zval_ptr_dtor(&current);
@@ -440,7 +440,7 @@
                
                if (has_value) {
                        ALLOC_INIT_ZVAL(current);
-                       if (php_var_unserialize(&current, (const unsigned char 
**) &q, endptr, &var_hash TSRMLS_CC)) {
+                       if (php_var_unserialize(&current, (const unsigned char 
**) &q, (const unsigned char *) endptr, &var_hash TSRMLS_CC)) {
                                php_set_session_var(name, namelen, current, 
&var_hash TSRMLS_CC);
                        }
                        zval_ptr_dtor(&current);
@@ -524,8 +524,8 @@
        int mask;
        int have;
        
-       p = in;
-       q = in + inlen;
+       p = (unsigned char *) in;
+       q = (unsigned char *)in + inlen;
 
        w = 0;
        have = 0;
@@ -581,17 +581,17 @@
 
        /* maximum 15+19+19+10 bytes */ 
        sprintf(buf, "%.15s%ld%ld%0.8f", remote_addr ? remote_addr : "", 
-                       tv.tv_sec, tv.tv_usec, php_combined_lcg(TSRMLS_C) * 10);
+                       tv.tv_sec, (long int)tv.tv_usec, 
php_combined_lcg(TSRMLS_C) * 10);
 
        switch (PS(hash_func)) {
        case PS_HASH_FUNC_MD5:
                PHP_MD5Init(&md5_context);
-               PHP_MD5Update(&md5_context, buf, strlen(buf));
+               PHP_MD5Update(&md5_context, (unsigned char *) buf, strlen(buf));
                digest_len = 16;
                break;
        case PS_HASH_FUNC_SHA1:
                PHP_SHA1Init(&sha1_context);
-               PHP_SHA1Update(&sha1_context, buf, strlen(buf));
+               PHP_SHA1Update(&sha1_context, (unsigned char *) buf, 
strlen(buf));
                digest_len = 20;
                break;
        default:
@@ -642,7 +642,7 @@
 
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "The ini setting 
hash_bits_per_character is out of range (should be 4, 5, or 6) - using 4 for 
now");
        }
-       j = (int) (bin_to_readable(digest, digest_len, buf, 
PS(hash_bits_per_character)) - buf);
+       j = (int) (bin_to_readable((char *)digest, digest_len, buf, 
PS(hash_bits_per_character)) - buf);
        
        if (newlen) 
                *newlen = j;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to