com php-src: Fixed other compiler warnings in PDO_PGSQL: ext/pdo_pgsql/pgsql_driver.c ext/pdo_pgsql/pgsql_st atement.c
| From: | Matteo Beccati | Date: | Wed, 21 Aug 2013 09:22:33 +0000 |
| Subject: | com php-src: Fixed other compiler warnings in PDO_PGSQL: ext/pdo_pgsql/pgsql_driver.c ext/pdo_pgsql/pgsql_st atement.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-73053@lists.php.net to get a copy of this message | ||
Commit: 696852f2bd500c9a2f54d7956ff13e57c0cb3f83
Author: Matteo Beccati <mbeccati@php.net> Wed, 21 Aug 2013 11:08:16 +0200
Parents: 5c06e5c2e020c49c3a99c88477014846e6d82b97
Branches: PHP-5.4 PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=696852f2bd500c9a2f54d7956ff13e57c0cb3f83
Log:
Fixed other compiler warnings in PDO_PGSQL
Changed paths:
M ext/pdo_pgsql/pgsql_driver.c
M ext/pdo_pgsql/pgsql_statement.c
Diff:
diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c
index 252bfff..5013643 100644
--- a/ext/pdo_pgsql/pgsql_driver.c
+++ b/ext/pdo_pgsql/pgsql_driver.c
@@ -315,9 +315,9 @@ static int pgsql_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, int unquote
case PDO_PARAM_LOB:
/* escapedlen returned by PQescapeBytea() accounts for trailing 0 */
#ifdef HAVE_PQESCAPE_BYTEA_CONN
- escaped = PQescapeByteaConn(H->server, unquoted, unquotedlen, &tmp_len);
+ escaped = PQescapeByteaConn(H->server, (unsigned char *)unquoted, (size_t)unquotedlen,
&tmp_len);
#else
- escaped = PQescapeBytea(unquoted, unquotedlen, &tmp_len);
+ escaped = PQescapeBytea((unsigned char *)unquoted, (size_t)unquotedlen, &tmp_len);
#endif
*quotedlen = (int)tmp_len + 1;
*quoted = emalloc(*quotedlen + 1);
@@ -331,9 +331,9 @@ static int pgsql_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, int unquote
*quoted = safe_emalloc(2, unquotedlen, 3);
(*quoted)[0] = '\'';
#ifndef HAVE_PQESCAPE_CONN
- *quotedlen = PQescapeString(*quoted + 1, unquoted, unquotedlen);
+ *quotedlen = PQescapeString(*quoted + 1, unquoted, (size_t)unquotedlen);
#else
- *quotedlen = PQescapeStringConn(H->server, *quoted + 1, unquoted, unquotedlen, NULL);
+ *quotedlen = PQescapeStringConn(H->server, *quoted + 1, unquoted, (size_t)unquotedlen, NULL);
#endif
(*quoted)[*quotedlen + 1] = '\'';
(*quoted)[*quotedlen + 2] = '\0';
diff --git a/ext/pdo_pgsql/pgsql_statement.c b/ext/pdo_pgsql/pgsql_statement.c
index 3ef8919..792ad27 100644
--- a/ext/pdo_pgsql/pgsql_statement.c
+++ b/ext/pdo_pgsql/pgsql_statement.c
@@ -536,7 +536,7 @@ static int pgsql_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, unsigned
*len = 0;
return 0;
} else {
- char *tmp_ptr = PQunescapeBytea(*ptr, &tmp_len);
+ char *tmp_ptr = (char *)PQunescapeBytea((unsigned char *)*ptr, &tmp_len);
if (!tmp_ptr) {
/* PQunescapeBytea returned an error */
*len = 0;