PHPAPI char *php_mb_safe_strrchr_ex(const char *s, unsigned int c, size_t nbytes, const mbfl_encoding *enc)
{
register const char *p = s;
- char *last;
+ char *last=NULL;
if (nbytes == (size_t)-1) {
while (*p != '\0') {
int backref; /* Backreference number */
int eval; /* If the replacement string should be eval'ed */
int start_offset; /* Where the new search starts */
- int g_notempty = 0; /* If the match should not be empty */
- int replace_len; /* Length of replacement string */
+ int g_notempty=0; /* If the match should not be empty */
+ int replace_len=0; /* Length of replacement string */
char *result, /* Result of replacement */
- *replace, /* Replacement string */
+ *replace=NULL, /* Replacement string */
*new_buf, /* Temporary buffer for re-allocation */
*walkbuf, /* Location of current replacement in the result */
*walk, /* Used to walk the replacement string */
*match, /* The current match */
*piece, /* The current piece of subject */
- *replace_end, /* End of replacement string */
+ *replace_end=NULL, /* End of replacement string */
*eval_result, /* Result of eval or custom function */
walk_last; /* Last walked character */
case 1:
tok = args[0];
break;
+ default:
case 2:
str = args[0];
tok = args[1];
PHP_FUNCTION(pathinfo)
{
zval *tmp;
- char *path, *ret;
+ char *path, *ret = NULL;
int path_len;
int opt = PHP_PATHINFO_ALL;
if (Z_TYPE_PP(args[1]) == IS_ARRAY) {
zend_hash_internal_pointer_reset(Z_ARRVAL_PP(args[1]));
+ i=0; /* not needed in this case: only kill a compiler warning */
} else {
i=1;
}