tony2001 Thu Jul 13 17:55:50 2006 UTC Modified files: /php-src/main main.c /php-src/ext/standard string.c Log: initialize variables http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.695&r2=1.696&diff_format=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.695 php-src/main/main.c:1.696 --- php-src/main/main.c:1.695 Wed Jul 12 17:04:13 2006 +++ php-src/main/main.c Thu Jul 13 17:55:50 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: main.c,v 1.695 2006/07/12 17:04:13 andrei Exp $ */ +/* $Id: main.c,v 1.696 2006/07/13 17:55:50 tony2001 Exp $ */ /* {{{ includes */ @@ -534,7 +534,7 @@ zstr function = NULL_ZSTR; char *origin; char *message; - char *stage; + char *stage = "Unknown"; int function_name_is_string = 1; /* get error text into buffer and escape for html if necessary */ http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.548&r2=1.549&diff_format=u Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.548 php-src/ext/standard/string.c:1.549 --- php-src/ext/standard/string.c:1.548 Wed Jul 12 12:33:04 2006 +++ php-src/ext/standard/string.c Thu Jul 13 17:55:50 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.548 2006/07/12 12:33:04 tony2001 Exp $ */ +/* $Id: string.c,v 1.549 2006/07/13 17:55:50 tony2001 Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -1326,7 +1326,7 @@ UChar *u_token, *u_p, *u_pe; UChar32 ch, th; - int32_t start, end, i, j, rem_len; + int32_t start = 0, end, i, j, rem_len; int delim_found, token_present; int skipped = 0; @@ -2111,7 +2111,7 @@ char needle_char[2]; UChar u_needle_char[3]; int needle_len; - char *haystack_copy; + char *haystack_copy = NULL; zstr target; void *found = NULL; int found_offset; @@ -2411,9 +2411,9 @@ zend_uchar str_type; void *haystack_dup, *needle_dup = NULL; char needle_char[2]; - char c; + char c = 0; UChar u_needle_char[3]; - UChar32 ch; + UChar32 ch = 0; void *found = NULL; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz|l", &haystack, &needle, &offset) == FAILURE) { @@ -3908,10 +3908,10 @@ PHP_FUNCTION(strrev) { zval **str; - char *s, *e, *n, *p; + char *s, *e, *n = NULL, *p; int32_t i, x1, x2; UChar32 ch; - UChar *u_s, *u_n, *u_p; + UChar *u_s, *u_n = NULL, *u_p; if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &str) == FAILURE) { WRONG_PARAM_COUNT; @@ -6316,7 +6316,7 @@ int ac = ZEND_NUM_ARGS(); int count = 0; void *p, *endp, *tmp; - int32_t i, j; + int32_t i = 0, j; char cmp; if (zend_parse_parameters(ac TSRMLS_CC, "TT|ll", @@ -6798,7 +6798,7 @@ if (haystack_type == IS_UNICODE) { int32_t i, j; - UChar32 ch1, ch2; + UChar32 ch1, ch2 = 0; for (i = 0 ; i < haystack_len ; ) { U16_NEXT((UChar *)haystack, i, haystack_len, ch1);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php