]> granicus.if.org Git - php/commitdiff
Fixed format errors & warning.
authorIlia Alshanetsky <iliaa@php.net>
Thu, 28 Aug 2003 17:54:03 +0000 (17:54 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 28 Aug 2003 17:54:03 +0000 (17:54 +0000)
ext/pgsql/pgsql.c

index b2ab411f6087b9f4f20c4abad909cf8654bfe3c0..d2638a8d3905b47df06f90a95c865da51ce3db0e 100644 (file)
@@ -540,12 +540,12 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                        
                        if (PGG(max_links)!=-1 && PGG(num_links)>=PGG(max_links)) {
                                php_error_docref(NULL TSRMLS_CC, E_WARNING,
-                                                                "Cannot create new link. Too many open links (%d).", PGG(num_links));
+                                                                "Cannot create new link. Too many open links (%ld).", PGG(num_links));
                                goto err;
                        }
                        if (PGG(max_persistent)!=-1 && PGG(num_persistent)>=PGG(max_persistent)) {
                                php_error_docref(NULL TSRMLS_CC, E_WARNING,
-                                                                "Cannot create new link. Too many open persistent links (%d).", PGG(num_persistent));
+                                                                "Cannot create new link. Too many open persistent links (%ld).", PGG(num_persistent));
                                goto err;
                        }
 
@@ -633,7 +633,7 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                        }
                }
                if (PGG(max_links)!=-1 && PGG(num_links)>=PGG(max_links)) {
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot create new link. Too many open links (%d).", PGG(num_links));
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot create new link. Too many open links (%ld).", PGG(num_links));
                        goto err;
                }
                if (connstring) {
@@ -1254,7 +1254,7 @@ PHP_FUNCTION(pg_fetch_result)
                convert_to_long_ex(row);
                pgsql_row = Z_LVAL_PP(row);
                if (pgsql_row < 0 || pgsql_row >= PQntuples(pgsql_result)) {
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to jump to row %d on PostgreSQL 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 PostgreSQL result index %ld.", Z_LVAL_PP(row), Z_LVAL_PP(result));
                        RETURN_FALSE;
                }
        }
@@ -1337,7 +1337,7 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type)
                        pgsql_row = Z_LVAL_PP(row);
                        pg_result->row = pgsql_row;
                        if (pgsql_row < 0 || pgsql_row >= PQntuples(pgsql_result)) {
-                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to jump to row %d on PostgreSQL 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 PostgreSQL result index %ld.", Z_LVAL_PP(row), Z_LVAL_PP(result));
                                RETURN_FALSE;
                        }
                } else {
@@ -1510,7 +1510,7 @@ static void php_pgsql_data_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
                convert_to_long_ex(row);
                pgsql_row = Z_LVAL_PP(row);
                if (pgsql_row < 0 || pgsql_row >= PQntuples(pgsql_result)) {
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to jump to row %d on PostgreSQL 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 PostgreSQL result index %ld.", Z_LVAL_PP(row), Z_LVAL_PP(result));
                        RETURN_FALSE;
                }
        }
@@ -2026,11 +2026,11 @@ PHP_FUNCTION(pg_lo_write)
        if (argc > 2) {
                convert_to_long_ex(z_len);
                if (Z_LVAL_PP(z_len) > Z_STRLEN_PP(str)) {
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot write more than buffer size %d. Tried to write %d.", Z_LVAL_PP(str), Z_LVAL_PP(z_len));
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot write more than buffer size %ld. Tried to write %ld.", Z_LVAL_PP(str), Z_LVAL_PP(z_len));
                        RETURN_FALSE;
                }
                if (Z_LVAL_PP(z_len) < 0) {
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Buffer size must be larger than 0, but %d was specified.", Z_LVAL_PP(str), Z_LVAL_PP(z_len));
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Buffer size must be larger than 0, but %ld was specified.", Z_LVAL_PP(z_len));
                        RETURN_FALSE;
                }
                len = Z_LVAL_PP(z_len);
@@ -2195,7 +2195,7 @@ PHP_FUNCTION(pg_lo_export)
        }
        else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc TSRMLS_CC,
                                                                          "lsr", &oid_long, &file_out, &name_len, &pgsql_link) == SUCCESS) {
-               php_error_docref(NULL TSRMLS_CC, E_NOTICE, " %s(): Old API is used");
+               php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Old API is used");
                if (oid_long <= InvalidOid) {
                        php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Invalid OID specified.");
                        RETURN_FALSE;