From: Antony Dovgal Date: Thu, 7 Dec 2006 20:45:21 +0000 (+0000) Subject: initialize variables and make Coverity happy X-Git-Tag: RELEASE_1_0_0RC1~773 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2122cf4fab6fa9efb8474e7f22d1348177b86a6e;p=php initialize variables and make Coverity happy --- diff --git a/Zend/zend_strtod.c b/Zend/zend_strtod.c index 3dfdab571f..ad27f7fd4c 100644 --- a/Zend/zend_strtod.c +++ b/Zend/zend_strtod.c @@ -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: diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c index 9d097b8a8e..d3536397b3 100644 --- a/ext/standard/formatted_print.c +++ b/ext/standard/formatted_print.c @@ -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));