cvs: php-src(PHP_5_2) /ext/session session.c
| From: | Ilia Alshanetsky | Date: | Thu, 13 Jul 2006 00:13:19 +0000 |
| Subject: | cvs: php-src(PHP_5_2) /ext/session session.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-39178@lists.php.net to get a copy of this message | ||
iliaa Thu Jul 13 00:13:19 2006 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/session session.c
Log:
Fixed compiler warnings.
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.417.2.8.2.3&r2=1.417.2.8.2.4&diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.417.2.8.2.3 php-src/ext/session/session.c:1.417.2.8.2.4
--- php-src/ext/session/session.c:1.417.2.8.2.3 Wed Jul 12 15:28:44 2006
+++ php-src/ext/session/session.c Thu Jul 13 00:13:19 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: session.c,v 1.417.2.8.2.3 2006/07/12 15:28:44 mike Exp $ */
+/* $Id: session.c,v 1.417.2.8.2.4 2006/07/13 00:13:19 iliaa Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -446,7 +446,7 @@
if (has_value) {
ALLOC_INIT_ZVAL(current);
- if (php_var_unserialize(¤t, (const unsigned char **) &p, endptr, &var_hash
TSRMLS_CC)) {
+ if (php_var_unserialize(¤t, (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(¤t);
@@ -526,7 +526,7 @@
if (has_value) {
ALLOC_INIT_ZVAL(current);
- if (php_var_unserialize(¤t, (const unsigned char **) &q, endptr, &var_hash
TSRMLS_CC)) {
+ if (php_var_unserialize(¤t, (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(¤t);
@@ -616,8 +616,8 @@
int mask;
int have;
- p = in;
- q = in + inlen;
+ p = (unsigned char *) in;
+ q = (unsigned char *)in + inlen;
w = 0;
have = 0;
@@ -673,17 +673,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:
@@ -734,7 +734,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;