summaryrefslogtreecommitdiff
path: root/ext/pdo_pgsql
diff options
context:
space:
mode:
authorMatteo Beccati <mbeccati@php.net>2013-08-21 11:24:27 +0200
committerMatteo Beccati <mbeccati@php.net>2013-08-21 11:24:27 +0200
commit4283f75c347a105e53ae38fc96e614671df53f1b (patch)
treec3f345fb2e95e71b6b1e3bc9e6be8fc023da10b5 /ext/pdo_pgsql
parent7be3c743392fbf1837760393403c7b703e502d3a (diff)
parent540f325664a6f4975cf005f367c95ece04757714 (diff)
downloadphp-git-4283f75c347a105e53ae38fc96e614671df53f1b.tar.gz
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4: Fixed compiler warnings in ext/pgsql Fixed other compiler warnings in PDO_PGSQL Fixed compiler warning
Diffstat (limited to 'ext/pdo_pgsql')
-rw-r--r--ext/pdo_pgsql/pgsql_driver.c8
-rw-r--r--ext/pdo_pgsql/pgsql_statement.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c
index 252bfff25b..50136430a0 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 3ef89196de..792ad27078 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;