]> granicus.if.org Git - php/commitdiff
- silent warning
authorPierre Joye <pajoye@php.net>
Wed, 2 Jun 2010 19:20:04 +0000 (19:20 +0000)
committerPierre Joye <pajoye@php.net>
Wed, 2 Jun 2010 19:20:04 +0000 (19:20 +0000)
ext/session/session.c

index ad406d857ce9fd2f229bd020bf793386da8024a3..289efa94932aac5033d0889073f8cd9163f31835 100644 (file)
@@ -382,8 +382,8 @@ PHPAPI char *php_session_create_id(PS_CREATE_SID_ARGS) /* {{{ */
                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");
        }
        
-       outid = emalloc((digest_len + 2) * ((8.0f / PS(hash_bits_per_character)) + 0.5));
-       j = (int) (bin_to_readable((char *)digest, digest_len, outid, PS(hash_bits_per_character)) - outid);
+       outid = emalloc((size_t)((digest_len + 2) * ((8.0f / PS(hash_bits_per_character)) + 0.5)));
+       j = (int) (bin_to_readable((char *)digest, digest_len, outid, (char)PS(hash_bits_per_character)) - outid);
        efree(digest);
 
        if (newlen) {