sas Thu Aug 28 12:49:58 2003 EDT Modified files: /php-src/ext/standard assert.c file.c filters.c fsock.c math.c proc_open.c scanf.c Log: fix format strings
Index: php-src/ext/standard/assert.c diff -u php-src/ext/standard/assert.c:1.57 php-src/ext/standard/assert.c:1.58 --- php-src/ext/standard/assert.c:1.57 Wed Aug 13 20:37:42 2003 +++ php-src/ext/standard/assert.c Thu Aug 28 12:49:57 2003 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: assert.c,v 1.57 2003/08/14 00:37:42 iliaa Exp $ */ +/* $Id: assert.c,v 1.58 2003/08/28 16:49:57 sas Exp $ */ /* {{{ includes/startup/misc */ @@ -276,7 +276,7 @@ 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; } Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.355 php-src/ext/standard/file.c:1.356 --- php-src/ext/standard/file.c:1.355 Mon Aug 11 19:16:53 2003 +++ php-src/ext/standard/file.c Thu Aug 28 12:49:57 2003 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.355 2003/08/11 23:16:53 iliaa Exp $ */ +/* $Id: file.c,v 1.356 2003/08/28 16:49:57 sas Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -547,7 +547,7 @@ 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 @@ 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; } Index: php-src/ext/standard/filters.c diff -u php-src/ext/standard/filters.c:1.35 php-src/ext/standard/filters.c:1.36 --- php-src/ext/standard/filters.c:1.35 Thu Aug 28 12:28:33 2003 +++ php-src/ext/standard/filters.c Thu Aug 28 12:49:57 2003 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: filters.c,v 1.35 2003/08/28 16:28:33 sas Exp $ */ +/* $Id: filters.c,v 1.36 2003/08/28 16:49:57 sas Exp $ */ #include "php.h" #include "php_globals.h" @@ -1500,15 +1500,15 @@ 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 @@ 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: Index: php-src/ext/standard/fsock.c diff -u php-src/ext/standard/fsock.c:1.115 php-src/ext/standard/fsock.c:1.116 --- php-src/ext/standard/fsock.c:1.115 Thu Aug 28 12:28:33 2003 +++ php-src/ext/standard/fsock.c Thu Aug 28 12:49:57 2003 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: fsock.c,v 1.115 2003/08/28 16:28:33 sas Exp $ */ +/* $Id: fsock.c,v 1.116 2003/08/28 16:49:57 sas Exp $ */ #include "php.h" #include "php_globals.h" @@ -83,7 +83,7 @@ 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) { Index: php-src/ext/standard/math.c diff -u php-src/ext/standard/math.c:1.106 php-src/ext/standard/math.c:1.107 --- php-src/ext/standard/math.c:1.106 Fri Aug 8 21:12:41 2003 +++ php-src/ext/standard/math.c Thu Aug 28 12:49:57 2003 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: math.c,v 1.106 2003/08/09 01:12:41 helly Exp $ */ +/* $Id: math.c,v 1.107 2003/08/28 16:49:57 sas Exp $ */ #include "php.h" #include "php_math.h" @@ -968,11 +968,11 @@ 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; } Index: php-src/ext/standard/proc_open.c diff -u php-src/ext/standard/proc_open.c:1.15 php-src/ext/standard/proc_open.c:1.16 --- php-src/ext/standard/proc_open.c:1.15 Sat Jul 12 03:01:30 2003 +++ php-src/ext/standard/proc_open.c Thu Aug 28 12:49:57 2003 @@ -15,7 +15,7 @@ | Author: Wez Furlong <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: proc_open.c,v 1.15 2003/07/12 07:01:30 moriyoshi Exp $ */ +/* $Id: proc_open.c,v 1.16 2003/08/28 16:49:57 sas Exp $ */ #include <stdio.h> #include "php.h" @@ -535,7 +535,7 @@ #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 @@ 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 @@ 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; } Index: php-src/ext/standard/scanf.c diff -u php-src/ext/standard/scanf.c:1.25 php-src/ext/standard/scanf.c:1.26 --- php-src/ext/standard/scanf.c:1.25 Mon Aug 11 19:16:53 2003 +++ php-src/ext/standard/scanf.c Thu Aug 28 12:49:57 2003 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: scanf.c,v 1.25 2003/08/11 23:16:53 iliaa Exp $ */ +/* $Id: scanf.c,v 1.26 2003/08/28 16:49:57 sas Exp $ */ /* scanf.c -- @@ -408,7 +408,7 @@ 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 @@ 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 @@ } 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 @@ 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"); }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php