]> granicus.if.org Git - php/commitdiff
initialize variables and make Coverity happy
authorAntony Dovgal <tony2001@php.net>
Thu, 7 Dec 2006 20:45:21 +0000 (20:45 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 7 Dec 2006 20:45:21 +0000 (20:45 +0000)
Zend/zend_strtod.c
ext/standard/formatted_print.c

index 3dfdab571fecf2c555b2b71c761b656ff7b36caf..ad27f7fd4c6bb8e5f65472dc39e38ab7b237d383 100644 (file)
@@ -1452,9 +1452,9 @@ ZEND_API char * zend_dtoa(double _d, int mode, int ndigits, int *decpt, int *sig
         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 @@ bump_up:
                        b2 += Log2P;
                        s2 += Log2P;
                        spec_case = 1;
-               }
-               else
+               } else {
                        spec_case = 0;
+               }
        }
 
        /* Arrange for convenient computation of quotients:
index 9d097b8a8e4b5cf0ddd481588e52d284ff9e0328..d3536397b3d9a3dba9d15205e15bf224524379a8 100644 (file)
@@ -196,9 +196,8 @@ php_sprintf_appenddouble(char **buffer, int *pos,
                                                 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));