Author: turnstep
Date: Fri Feb 29 05:02:41 2008
New Revision: 10853
Modified:
DBD-Pg/trunk/dbdimp.c
Log:
Take out castings, causes warnings on some platforms.
Modified: DBD-Pg/trunk/dbdimp.c
==============================================================================
--- DBD-Pg/trunk/dbdimp.c (original)
+++ DBD-Pg/trunk/dbdimp.c Fri Feb 29 05:02:41 2008
@@ -2021,7 +2021,7 @@
int params = 0;
if (imp_sth->numbound!=0) {
params = imp_sth->numphs;
- Newz(0, paramTypes, (unsigned)imp_sth->numphs, Oid);
+ Newz(0, paramTypes, imp_sth->numphs, Oid);
for (x=0,currph=imp_sth->ph; NULL != currph;
currph=currph->nextph) {
paramTypes[x++] = (currph->defaultval) ? 0 :
(Oid)currph->bind_type->type_id;
}
@@ -2799,7 +2799,7 @@
}
else { /* We are using a server that can handle
PQexecParams/PQexecPrepared */
/* Put all values into an array to pass to PQexecPrepared */
- Newz(0, paramValues, (unsigned)imp_sth->numphs, const char *);
/* freed below */
+ Newz(0, paramValues, imp_sth->numphs, const char *); /* freed
below */
for (x=0,currph=imp_sth->ph; NULL != currph;
currph=currph->nextph) {
paramValues[x++] = currph->value;
}
@@ -2807,8 +2807,8 @@
/* Binary or regular? */
if (imp_sth->has_binary) {
- Newz(0, paramLengths, (unsigned)imp_sth->numphs, int);
/* freed below */
- Newz(0, paramFormats, (unsigned)imp_sth->numphs, int);
/* freed below */
+ Newz(0, paramLengths, imp_sth->numphs, int); /* freed
below */
+ Newz(0, paramFormats, imp_sth->numphs, int); /* freed
below */
for (x=0,currph=imp_sth->ph; NULL != currph;
currph=currph->nextph,x++) {
if (PG_BYTEA==currph->bind_type->type_id) {
paramLengths[x] = (int)currph->valuelen;
@@ -2945,7 +2945,7 @@
statement[execsize] = '\0';
/* Populate paramTypes */
- Newz(0, paramTypes, (unsigned)imp_sth->numphs, Oid);
+ Newz(0, paramTypes, imp_sth->numphs, Oid);
for (x=0,currph=imp_sth->ph; NULL != currph;
currph=currph->nextph) {
paramTypes[x++] = (currph->defaultval) ? 0 :
(Oid)currph->bind_type->type_id;
}
@@ -3163,7 +3163,7 @@
/* Set up the type_info array if we have not seen it yet */
if (NULL == imp_sth->type_info) {
- Newz(0, imp_sth->type_info, (unsigned)num_fields,
sql_type_info_t*); /* freed in dbd_st_destroy */
+ Newz(0, imp_sth->type_info, num_fields, sql_type_info_t*); /*
freed in dbd_st_destroy */
for (i = 0; i < num_fields; ++i) {
TRACE_PQFTYPE;
imp_sth->type_info[i] =
pg_type_data((int)PQftype(imp_sth->result, i));