summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2002-10-24 19:15:40 +0000
committerMarcus Boerger <helly@php.net>2002-10-24 19:15:40 +0000
commit15b2e277a479175557dd964ad833eb005798d000 (patch)
tree80c3603d15d3fcd17b10b589e3ef3779d6d0b6d2
parent67670560e4be002d96250d5402b07055ddef5d2e (diff)
downloadphp-git-15b2e277a479175557dd964ad833eb005798d000.tar.gz
fix compiler warning
-rw-r--r--ext/dbx/dbx_odbc.c1
-rw-r--r--ext/mbstring/mbstring.c2
-rw-r--r--ext/mysql/libmysql/string.c2
-rw-r--r--ext/pcre/php_pcre.c8
-rw-r--r--ext/pgsql/pgsql.c2
-rw-r--r--ext/standard/math.c2
-rw-r--r--ext/standard/string.c4
7 files changed, 11 insertions, 10 deletions
diff --git a/ext/dbx/dbx_odbc.c b/ext/dbx/dbx_odbc.c
index 40f282b2bc..01a0a82aec 100644
--- a/ext/dbx/dbx_odbc.c
+++ b/ext/dbx/dbx_odbc.c
@@ -72,7 +72,6 @@ int dbx_odbc_close(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS)
int number_of_arguments=1;
zval **arguments[1];
zval *returned_zval=NULL;
- int exit_status=EG(exit_status);
int actual_resource_type;
void *resource;
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c
index d44d51cd75..5a2a6109e8 100644
--- a/ext/mbstring/mbstring.c
+++ b/ext/mbstring/mbstring.c
@@ -3475,7 +3475,7 @@ PHPAPI size_t php_mb_mbchar_bytes(const char *s TSRMLS_DC)
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') {
diff --git a/ext/mysql/libmysql/string.c b/ext/mysql/libmysql/string.c
index cbf9f2ddc3..5de6428242 100644
--- a/ext/mysql/libmysql/string.c
+++ b/ext/mysql/libmysql/string.c
@@ -37,7 +37,7 @@ my_bool init_dynamic_string(DYNAMIC_STRING *str, const char *init_str,
my_bool dynstr_set(DYNAMIC_STRING *str, const char *init_str)
{
- uint length;
+ uint length=0;
DBUG_ENTER("dynstr_set");
if (init_str && (length= (uint) strlen(init_str)+1) > str->max_length)
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index 084dd4958f..e3489415bd 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -753,16 +753,16 @@ PHPAPI char *php_pcre_replace(char *regex, int regex_len,
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 */
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index a4d437382c..70aa530229 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -3048,7 +3048,7 @@ PHP_FUNCTION(pg_get_notify)
PHP_FUNCTION(pg_get_pid)
{
zval *pgsql_link;
- int id = -1, pid;
+ int id = -1;
PGconn *pgsql;
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "r",
diff --git a/ext/standard/math.c b/ext/standard/math.c
index 219a269d24..dafaf05788 100644
--- a/ext/standard/math.c
+++ b/ext/standard/math.c
@@ -677,7 +677,7 @@ _php_math_basetolong(zval *arg, int base) {
PHPAPI int
_php_math_basetozval(zval *arg, int base, zval *ret) {
long num = 0;
- double fnum;
+ double fnum = 0;
int i;
int mode = 0;
char c, *s;
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 0c4a09c5ed..588943ebe4 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -915,6 +915,7 @@ PHP_FUNCTION(strtok)
case 1:
tok = args[0];
break;
+ default:
case 2:
str = args[0];
tok = args[1];
@@ -1198,7 +1199,7 @@ PHP_FUNCTION(dirname)
PHP_FUNCTION(pathinfo)
{
zval *tmp;
- char *path, *ret;
+ char *path, *ret = NULL;
int path_len;
int opt = PHP_PATHINFO_ALL;
@@ -3182,6 +3183,7 @@ PHP_FUNCTION(setlocale)
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;
}