summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend_strtod.c8
-rw-r--r--ext/standard/formatted_print.c5
2 files changed, 6 insertions, 7 deletions
diff --git a/Zend/zend_strtod.c b/Zend/zend_strtod.c
index 01091fd36a..4fed8c3552 100644
--- a/Zend/zend_strtod.c
+++ b/Zend/zend_strtod.c
@@ -1449,9 +1449,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;
@@ -1828,9 +1828,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 07b2b445b3..c0e36ce043 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));