From:             mcihar at suse dot cz
Operating system: Linux, 64-bit
PHP version:      5.0.3
PHP Bug Type:     Compile Warning
Bug description:  Wrong format string in zend_mm_alloc

Description:
------------
php-5.0.3/Zend/zend_mm.c: In function `zend_mm_alloc':
php-5.0.3/Zend/zend_mm.c:322: warning: int format, different type arg (arg
3)
php-5.0.3/Zend/zend_mm.c:327: warning: int format, different type arg (arg
3)

fix (won't it be better to attach patches?):

--- Zend/zend_mm.c.orig 2004-03-04 10:18:05.000000000 +0100
+++ Zend/zend_mm.c  2005-02-21 13:12:20.252314257 +0100
@@ -319,12 +319,12 @@
        if (true_size > (heap->block_size - ZEND_MM_ALIGNED_SEGMENT_SIZE -
ZEND_MM_ALIGNED_HEADER_SIZE)) {
            /* Make sure we add a memory block which is big enough */
            if (zend_mm_add_memory_block(heap, true_size +
ZEND_MM_ALIGNED_SEGMENT_SIZE + ZEND_MM_ALIGNED_HEADER_SIZE)) {
-               zend_error(E_ERROR, "Out of memory: cannot allocate %d
bytes!", true_size);
+               zend_error(E_ERROR, "Out of memory: cannot allocate %zd
bytes!", true_size);
                return NULL;
            }
        } else {
            if (zend_mm_add_memory_block(heap, heap->block_size)) {
-               zend_error(E_ERROR, "Out of memory: cannot allocate %d
bytes!", heap->block_size);
+               zend_error(E_ERROR, "Out of memory: cannot allocate %zd
bytes!", heap->block_size);
                return NULL;
            }
        }



-- 
Edit bug report at http://bugs.php.net/?id=32047&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=32047&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=32047&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=32047&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=32047&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=32047&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=32047&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=32047&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=32047&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=32047&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=32047&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=32047&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=32047&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=32047&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=32047&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=32047&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=32047&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=32047&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=32047&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=32047&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=32047&r=mysqlcfg

Reply via email to