]> granicus.if.org Git - php/commitdiff
MFH: Compiler warning fixes.
authorIlia Alshanetsky <iliaa@php.net>
Thu, 28 Aug 2003 19:18:57 +0000 (19:18 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 28 Aug 2003 19:18:57 +0000 (19:18 +0000)
ext/ftp/php_ftp.c
ext/imap/php_imap.c
ext/mysql/php_mysql.c
main/streams.c

index fa9c67dbfd55391ce2b46ac8ed30ccfe606305d9..523f77b08045b496bc78204efb848b2525e35a6e 100644 (file)
@@ -1161,7 +1161,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;
        }
@@ -1190,7 +1190,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;
        }
index 72fe163088f2bc08e9e43a70457f71f86d44ca83..c13d692eac1ec0e713e1afcc70df41eb7cd09bdd 100644 (file)
@@ -632,7 +632,7 @@ PHP_RSHUTDOWN_FUNCTION(imap)
                if (EG(error_reporting) & E_NOTICE) {
                        ecur = IMAPG(imap_errorstack);
                        while (ecur != NIL) {
-                               php_error(E_NOTICE, "%s(): %s (errflg=%d)", get_active_function_name(TSRMLS_C), ecur->LTEXT, ecur->errflg);
+                               php_error(E_NOTICE, "%s(): %s (errflg=%ld)", get_active_function_name(TSRMLS_C), ecur->LTEXT, ecur->errflg);
                                ecur = ecur->next;
                        }
                }
index c5e04597feb0357c31d2e8f6a7bf5adfc6a60848..e601a6d7084c1f0a399e25ad0e7f4f38574a5bd7 100644 (file)
@@ -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) {
@@ -2025,7 +2025,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));
@@ -2192,7 +2192,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));
@@ -2225,7 +2225,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));
index 06a9a1a0d95bd2a5df967cce5f97695ddf1c7fb8..74cb7f3a5abf0df14c2fdca9b277e35d76ef90f5 100755 (executable)
@@ -2268,7 +2268,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 conversion to FILE*!",
+                               "%ld bytes of buffered data lost during conversion to FILE*!",
                                stream->writepos - stream->readpos);
        }