kalle           Fri May 15 17:28:08 2009 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/bz2    bz2.c 
  Log:
  MFH: Fix compiler warnings
  
http://cvs.php.net/viewvc.cgi/php-src/ext/bz2/bz2.c?r1=1.14.2.3.2.12.2.11&r2=1.14.2.3.2.12.2.12&diff_format=u
Index: php-src/ext/bz2/bz2.c
diff -u php-src/ext/bz2/bz2.c:1.14.2.3.2.12.2.11 
php-src/ext/bz2/bz2.c:1.14.2.3.2.12.2.12
--- php-src/ext/bz2/bz2.c:1.14.2.3.2.12.2.11    Wed Dec 31 11:15:35 2008
+++ php-src/ext/bz2/bz2.c       Fri May 15 17:28:08 2009
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
  
-/* $Id: bz2.c,v 1.14.2.3.2.12.2.11 2008/12/31 11:15:35 sebastian Exp $ */
+/* $Id: bz2.c,v 1.14.2.3.2.12.2.12 2009/05/15 17:28:08 kalle Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -495,7 +495,7 @@
           + .01 x length of data + 600 which is the largest size the results 
of the compression 
           could possibly be, at least that's what the libbz2 docs say (thanks 
to jer...@nirvani.net 
           for pointing this out).  */
-       dest_len   = source_len + (0.01 * source_len) + 600;
+       dest_len   = (unsigned int) (source_len + (0.01 * source_len) + 600);
        
        /* Allocate the destination buffer */
        dest = emalloc(dest_len + 1);
@@ -559,15 +559,15 @@
                /* compression is better then 2:1, need to allocate more memory 
*/
                bzs.avail_out = source_len;
                size = (bzs.total_out_hi32 * (unsigned int) -1) + 
bzs.total_out_lo32;
-               dest = safe_erealloc(dest, 1, bzs.avail_out+1, size );
+               dest = safe_erealloc(dest, 1, bzs.avail_out+1, (size_t) size );
                bzs.next_out = dest + size;
        }
 
        if (error == BZ_STREAM_END || error == BZ_OK) {
                size = (bzs.total_out_hi32 * (unsigned int) -1) + 
bzs.total_out_lo32;
-               dest = safe_erealloc(dest, 1, size, 1);
+               dest = safe_erealloc(dest, 1, (size_t) size, 1);
                dest[size] = '\0';
-               RETVAL_STRINGL(dest, size, 0);
+               RETVAL_STRINGL(dest, (int) size, 0);
        } else { /* real error */
                efree(dest);
                RETVAL_LONG(error);



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

Reply via email to