summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2003-08-28 19:17:34 +0000
committerIlia Alshanetsky <iliaa@php.net>2003-08-28 19:17:34 +0000
commit9d9727aac55b3f395402b57b49907d60abef59fa (patch)
tree33986815125303685894bbd969aec22bde8f1551
parent4f2e9bbc459dcc12449add12bfef91f70d398c21 (diff)
downloadphp-git-9d9727aac55b3f395402b57b49907d60abef59fa.tar.gz
Fixed compiler warnings.
-rw-r--r--ext/ftp/php_ftp.c4
-rw-r--r--ext/imap/php_imap.c2
-rw-r--r--ext/mysql/php_mysql.c16
-rw-r--r--main/streams/cast.c2
4 files changed, 12 insertions, 12 deletions
diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c
index dc19bb69aa..902b0565e4 100644
--- a/ext/ftp/php_ftp.c
+++ b/ext/ftp/php_ftp.c
@@ -1167,7 +1167,7 @@ PHP_FUNCTION(ftp_set_option)
RETURN_TRUE;
break;
default:
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown option '%d'", option);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown option '%ld'", option);
RETURN_FALSE;
break;
}
@@ -1196,7 +1196,7 @@ PHP_FUNCTION(ftp_get_option)
RETURN_BOOL(ftp->autoseek);
break;
default:
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown option '%d'", option);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown option '%ld'", option);
RETURN_FALSE;
break;
}
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c
index c5dc15b6d1..55bfa50d5d 100644
--- a/ext/imap/php_imap.c
+++ b/ext/imap/php_imap.c
@@ -646,7 +646,7 @@ PHP_RSHUTDOWN_FUNCTION(imap)
if (EG(error_reporting) & E_NOTICE) {
ecur = IMAPG(imap_errorstack);
while (ecur != NIL) {
- php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%s (errflg=%d)", ecur->LTEXT, ecur->errflg);
+ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%s (errflg=%ld)", ecur->LTEXT, ecur->errflg);
ecur = ecur->next;
}
}
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c
index f812d09137..e720c35a43 100644
--- a/ext/mysql/php_mysql.c
+++ b/ext/mysql/php_mysql.c
@@ -652,12 +652,12 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
list_entry new_le;
if (MySG(max_links)!=-1 && MySG(num_links)>=MySG(max_links)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%d)", MySG(num_links));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%ld)", MySG(num_links));
efree(hashed_details);
MYSQL_DO_CONNECT_RETURN_FALSE();
}
if (MySG(max_persistent)!=-1 && MySG(num_persistent)>=MySG(max_persistent)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open persistent links (%d)", MySG(num_persistent));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open persistent links (%ld)", MySG(num_persistent));
efree(hashed_details);
MYSQL_DO_CONNECT_RETURN_FALSE();
}
@@ -762,7 +762,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
}
}
if (MySG(max_links)!=-1 && MySG(num_links)>=MySG(max_links)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%d)", MySG(num_links));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%ld)", MySG(num_links));
efree(hashed_details);
MYSQL_DO_CONNECT_RETURN_FALSE();
}
@@ -1772,7 +1772,7 @@ PHP_FUNCTION(mysql_result)
convert_to_long_ex(row);
if (Z_LVAL_PP(row)<0 || Z_LVAL_PP(row)>=(int)mysql_num_rows(mysql_result)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to jump to row %d on MySQL result index %d", Z_LVAL_PP(row), Z_LVAL_PP(result));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to jump to row %ld on MySQL result index %ld", Z_LVAL_PP(row), Z_LVAL_PP(result));
RETURN_FALSE;
}
mysql_data_seek(mysql_result, Z_LVAL_PP(row));
@@ -1804,7 +1804,7 @@ PHP_FUNCTION(mysql_result)
i++;
}
if (!tmp_field) { /* no match found */
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s%s%s not found in MySQL result index %d",
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s%s%s not found in MySQL result index %ld",
(table_name?table_name:""), (table_name?".":""), field_name, Z_LVAL_PP(result));
efree(field_name);
if (table_name) {
@@ -2023,7 +2023,7 @@ PHP_FUNCTION(mysql_data_seek)
convert_to_long_ex(offset);
if (Z_LVAL_PP(offset)<0 || Z_LVAL_PP(offset)>=(int)mysql_num_rows(mysql_result)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset %d is invalid for MySQL result index %d (or the query data is unbuffered)", Z_LVAL_PP(offset), Z_LVAL_PP(result));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset %ld is invalid for MySQL result index %ld (or the query data is unbuffered)", Z_LVAL_PP(offset), Z_LVAL_PP(result));
RETURN_FALSE;
}
mysql_data_seek(mysql_result, Z_LVAL_PP(offset));
@@ -2186,7 +2186,7 @@ PHP_FUNCTION(mysql_field_seek)
convert_to_long_ex(offset);
if (Z_LVAL_PP(offset)<0 || Z_LVAL_PP(offset)>=(int)mysql_num_fields(mysql_result)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Field %d is invalid for MySQL result index %d", Z_LVAL_PP(offset), Z_LVAL_PP(result));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Field %ld is invalid for MySQL result index %ld", Z_LVAL_PP(offset), Z_LVAL_PP(result));
RETURN_FALSE;
}
mysql_field_seek(mysql_result, Z_LVAL_PP(offset));
@@ -2219,7 +2219,7 @@ static void php_mysql_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
convert_to_long_ex(field);
if (Z_LVAL_PP(field)<0 || Z_LVAL_PP(field)>=(int)mysql_num_fields(mysql_result)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Field %d is invalid for MySQL result index %d", Z_LVAL_PP(field), Z_LVAL_PP(result));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Field %ld is invalid for MySQL result index %ld", Z_LVAL_PP(field), Z_LVAL_PP(result));
RETURN_FALSE;
}
mysql_field_seek(mysql_result, Z_LVAL_PP(field));
diff --git a/main/streams/cast.c b/main/streams/cast.c
index 3d31f86433..56582176a3 100644
--- a/main/streams/cast.c
+++ b/main/streams/cast.c
@@ -266,7 +266,7 @@ exit_success:
* know that they should try something else */
php_error_docref(NULL TSRMLS_CC, E_WARNING,
- "%d bytes of buffered data lost during stream conversion!",
+ "%ld bytes of buffered data lost during stream conversion!",
stream->writepos - stream->readpos);
}