tony2001                Thu Dec  7 20:45:21 2006 UTC

  Modified files:              
    /ZendEngine2        zend_strtod.c 
    /php-src/ext/standard       formatted_print.c 
  Log:
  initialize variables and make Coverity happy
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_strtod.c?r1=1.26&r2=1.27&diff_format=u
Index: ZendEngine2/zend_strtod.c
diff -u ZendEngine2/zend_strtod.c:1.26 ZendEngine2/zend_strtod.c:1.27
--- ZendEngine2/zend_strtod.c:1.26      Wed Dec  6 12:25:29 2006
+++ ZendEngine2/zend_strtod.c   Thu Dec  7 20:45:21 2006
@@ -1452,9 +1452,9 @@
         to hold the suppressed trailing zeros.
     */
 
-       int bbits, b2, b5, be, dig, i, ieps, ilim, ilim0, ilim1,
+       int bbits, b2, b5, be, dig, i, ieps, ilim = 0, ilim0, ilim1,
                j, j1, k, k0, k_check, leftright, m2, m5, s2, s5,
-               spec_case, try_quick;
+               spec_case = 0, try_quick;
        Long L;
 #ifndef Sudden_Underflow
        int denorm;
@@ -1831,9 +1831,9 @@
                        b2 += Log2P;
                        s2 += Log2P;
                        spec_case = 1;
-               }
-               else
+               } else {
                        spec_case = 0;
+               }
        }
 
        /* Arrange for convenient computation of quotients:
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/formatted_print.c?r1=1.87&r2=1.88&diff_format=u
Index: php-src/ext/standard/formatted_print.c
diff -u php-src/ext/standard/formatted_print.c:1.87 
php-src/ext/standard/formatted_print.c:1.88
--- php-src/ext/standard/formatted_print.c:1.87 Wed Dec  6 16:28:27 2006
+++ php-src/ext/standard/formatted_print.c      Thu Dec  7 20:45:21 2006
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: formatted_print.c,v 1.87 2006/12/06 16:28:27 tony2001 Exp $ */
+/* $Id: formatted_print.c,v 1.88 2006/12/07 20:45:21 tony2001 Exp $ */
 
 #include <math.h>                              /* modf() */
 #include "php.h"
@@ -196,9 +196,8 @@
                                                 TSRMLS_DC)
 {
        char num_buf[NUM_BUF_SIZE];
-       char *s, *q;
-       int s_len;
-       int is_negative;
+       char *s = NULL, *q;
+       int s_len = 0, is_negative = 0;
 
        PRINTF_DEBUG(("sprintf: appenddouble(%x, %x, %x, %f, %d, '%c', %d, 
%c)\n",
                                  *buffer, pos, size, number, width, padding, 
alignment, fmt));

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

Reply via email to