summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2003-08-28 16:49:57 +0000
committerSascha Schumann <sas@php.net>2003-08-28 16:49:57 +0000
commit436a07176cd99736fb907f7ed94213a8fc0fa5bb (patch)
treeef7f75f0f0438bc59892e736263a287d8c7a2ec9
parent341b7b5df1140a31198aa18200c039eecf8d4e11 (diff)
downloadphp-git-436a07176cd99736fb907f7ed94213a8fc0fa5bb.tar.gz
fix format strings
-rw-r--r--ext/standard/assert.c2
-rw-r--r--ext/standard/file.c4
-rw-r--r--ext/standard/filters.c12
-rw-r--r--ext/standard/fsock.c2
-rw-r--r--ext/standard/math.c4
-rw-r--r--ext/standard/proc_open.c8
-rw-r--r--ext/standard/scanf.c8
7 files changed, 20 insertions, 20 deletions
diff --git a/ext/standard/assert.c b/ext/standard/assert.c
index c01d0c6622..fddd08702a 100644
--- a/ext/standard/assert.c
+++ b/ext/standard/assert.c
@@ -276,7 +276,7 @@ PHP_FUNCTION(assert_options)
break;
default:
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown value %d", Z_LVAL_PP(what));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown value %ld", Z_LVAL_PP(what));
break;
}
diff --git a/ext/standard/file.c b/ext/standard/file.c
index b59c79a802..c6829ae66b 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -547,7 +547,7 @@ PHP_FUNCTION(file_put_contents)
break;
default:
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "The 2nd parameter should be either a string or an array.", flags);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "The 2nd parameter should be either a string or an array.");
numbytes = -1;
break;
@@ -588,7 +588,7 @@ PHP_FUNCTION(file)
return;
}
if (flags < 0 || flags > (PHP_FILE_USE_INCLUDE_PATH | PHP_FILE_IGNORE_NEW_LINES | PHP_FILE_SKIP_EMPTY_LINES | PHP_FILE_NO_DEFAULT_CONTEXT)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "'%d' flag is not supported.", flags);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "'%ld' flag is not supported.", flags);
RETURN_FALSE;
}
diff --git a/ext/standard/filters.c b/ext/standard/filters.c
index 1e64cc19a1..ae7dfa8c4a 100644
--- a/ext/standard/filters.c
+++ b/ext/standard/filters.c
@@ -1500,15 +1500,15 @@ static php_stream_filter_status_t strfilter_convert_filter(
switch (err) {
case PHP_CONV_ERR_UNKNOWN:
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "stream filter (%s): unknown error", inst->filtername, err);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "stream filter (%s): unknown error", inst->filtername);
goto out_failure;
case PHP_CONV_ERR_INVALID_SEQ:
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "stream filter (%s): invalid base64 sequence", inst->filtername, err);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "stream filter (%s): invalid base64 sequence", inst->filtername);
goto out_failure;
case PHP_CONV_ERR_UNEXPECTED_EOS:
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "stream filter (%s): unexpected end of stream", inst->filtername, err);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "stream filter (%s): unexpected end of stream", inst->filtername);
goto out_failure;
default:
@@ -1573,15 +1573,15 @@ static php_stream_filter_status_t strfilter_convert_filter(
switch (err) {
case PHP_CONV_ERR_UNKNOWN:
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "stream filter (%s): unknown error", inst->filtername, err);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "stream filter (%s): unknown error", inst->filtername);
goto out_failure;
case PHP_CONV_ERR_INVALID_SEQ:
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "stream filter (%s): invalid base64 sequence", inst->filtername, err);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "stream filter (%s): invalid base64 sequence", inst->filtername);
goto out_failure;
case PHP_CONV_ERR_UNEXPECTED_EOS:
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "stream filter (%s): unexpected end of stream", inst->filtername, err);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "stream filter (%s): unexpected end of stream", inst->filtername);
goto out_failure;
default:
diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c
index 4932965383..0d3df92fbd 100644
--- a/ext/standard/fsock.c
+++ b/ext/standard/fsock.c
@@ -83,7 +83,7 @@ static void php_fsockopen_stream(INTERNAL_FUNCTION_PARAMETERS, int persistent)
efree(hostname);
}
if (stream == NULL) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to connect to %s:%d (%s)", host, port, errstr == NULL ? "Unknown error" : errstr);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to connect to %s:%ld (%s)", host, port, errstr == NULL ? "Unknown error" : errstr);
}
if (hashkey) {
diff --git a/ext/standard/math.c b/ext/standard/math.c
index 7d7c73f84b..a9a86e6f81 100644
--- a/ext/standard/math.c
+++ b/ext/standard/math.c
@@ -968,11 +968,11 @@ PHP_FUNCTION(base_convert)
convert_to_long_ex(frombase);
convert_to_long_ex(tobase);
if (Z_LVAL_PP(frombase) < 2 || Z_LVAL_PP(frombase) > 36) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid `from base' (%d)", Z_LVAL_PP(frombase));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid `from base' (%ld)", Z_LVAL_PP(frombase));
RETURN_FALSE;
}
if (Z_LVAL_PP(tobase) < 2 || Z_LVAL_PP(tobase) > 36) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid `to base' (%d)", Z_LVAL_PP(tobase));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid `to base' (%ld)", Z_LVAL_PP(tobase));
RETURN_FALSE;
}
diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c
index 5a17e91bc2..daf4985050 100644
--- a/ext/standard/proc_open.c
+++ b/ext/standard/proc_open.c
@@ -535,7 +535,7 @@ PHP_FUNCTION(proc_open)
#else
descriptors[ndesc].childend = dup(fd);
if (descriptors[ndesc].childend < 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to dup File-Handle for descriptor %d - %s", nindex, strerror(errno));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to dup File-Handle for descriptor %ld - %s", nindex, strerror(errno));
goto exit_fail;
}
#endif
@@ -560,7 +560,7 @@ PHP_FUNCTION(proc_open)
if (zend_hash_index_find(Z_ARRVAL_PP(descitem), 1, (void **)&zmode) == SUCCESS) {
convert_to_string_ex(zmode);
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing mode parameter for 'pipe'", Z_STRVAL_PP(ztype));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing mode parameter for 'pipe'");
goto exit_fail;
}
@@ -601,14 +601,14 @@ PHP_FUNCTION(proc_open)
if (zend_hash_index_find(Z_ARRVAL_PP(descitem), 1, (void **)&zfile) == SUCCESS) {
convert_to_string_ex(zfile);
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing file name parameter for 'file'", Z_STRVAL_PP(ztype));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing file name parameter for 'file'");
goto exit_fail;
}
if (zend_hash_index_find(Z_ARRVAL_PP(descitem), 2, (void **)&zmode) == SUCCESS) {
convert_to_string_ex(zmode);
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing mode parameter for 'file'", Z_STRVAL_PP(ztype));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing mode parameter for 'file'");
goto exit_fail;
}
diff --git a/ext/standard/scanf.c b/ext/standard/scanf.c
index 832272134e..ae3646da2a 100644
--- a/ext/standard/scanf.c
+++ b/ext/standard/scanf.c
@@ -408,7 +408,7 @@ PHPAPI int ValidateFormat(char *format, int numVars, int *totalSubs)
gotSequential = 1;
if (gotXpg) {
mixedXPG:
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot mix \"%\" and \"%n$\" conversion specifiers");
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", "cannot mix \"%\" and \"%n$\" conversion specifiers");
goto error;
}
@@ -495,7 +495,7 @@ PHPAPI int ValidateFormat(char *format, int numVars, int *totalSubs)
goto error;
default:
{
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad scan conversion character \"%c\"", ch);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad scan conversion character \"%c\"", *ch);
goto error;
}
}
@@ -545,7 +545,7 @@ PHPAPI int ValidateFormat(char *format, int numVars, int *totalSubs)
}
for (i = 0; i < numVars; i++) {
if (nassign[i] > 1) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Variable is assigned by multiple \"%n$\" conversion specifiers");
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", "Variable is assigned by multiple \"%n$\" conversion specifiers");
goto error;
} else if (!xpgSize && (nassign[i] == 0)) {
/*
@@ -564,7 +564,7 @@ PHPAPI int ValidateFormat(char *format, int numVars, int *totalSubs)
badIndex:
if (gotXpg) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "\"%n$\" argument index out of range");
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", "\"%n$\" argument index out of range");
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Different numbers of variable names and field specifiers");
}