diff options
author | Matteo Beccati <mbeccati@php.net> | 2013-08-21 11:08:16 +0200 |
---|---|---|
committer | Matteo Beccati <mbeccati@php.net> | 2013-08-21 11:22:33 +0200 |
commit | 696852f2bd500c9a2f54d7956ff13e57c0cb3f83 (patch) | |
tree | 88da18e8b8e2bf3edd66ad52f8935b2cfadba5b4 | |
parent | 5c06e5c2e020c49c3a99c88477014846e6d82b97 (diff) | |
download | php-git-696852f2bd500c9a2f54d7956ff13e57c0cb3f83.tar.gz |
Fixed other compiler warnings in PDO_PGSQL
-rw-r--r-- | ext/pdo_pgsql/pgsql_driver.c | 8 | ||||
-rw-r--r-- | ext/pdo_pgsql/pgsql_statement.c | 2 |
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; |