psqlodbc.git / summary / log / commit / refs
commit 06e69c19cc1ec37d95f36b8b23186e5f6924de81
Author: Hiroshi Inoue <h-inoue@dream.email.ne.jp>
Date: Sun Jan 29 05:04:41 2017 +0000
Fix a compiltaion error and some warnings.
dlg_specific.c | 2 +-
drvconn.c | 4 ++--
pgapi30.c | 5 +----
pgtypes.c | 1 -
results.c | 5 +----
5 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/dlg_specific.c b/dlg_specific.c
index b212a5c0..a3bda44e 100644
--- a/dlg_specific.c
+++ b/dlg_specific.c
@@ -986,7 +986,7 @@ getDSNinfo(ConnInfo *ci, char overwrite)
if (NAME_IS_NULL(ci->pqopt))
{
SQLGetPrivateProfileString(DSN, INI_PQOPT, "", encoded_item, sizeof(encoded_item), ODBC_INI);
- STR_TO_NAME(ci->pqopt, encoded_item);
+ STRX_TO_NAME(ci->pqopt, encoded_item);
}
if (ci->translation_dll[0] == '\0' || overwrite)
diff --git a/drvconn.c b/drvconn.c
index 8d41884d..23564d42 100644
--- a/drvconn.c
+++ b/drvconn.c
@@ -494,7 +494,7 @@ dconn_get_attributes(copyfunc func, const char *connect_string, ConnInfo *ci)
*/
switch (*value)
{
- const char *closep;
+ const char *valuen, *closep;
case OPENING_BRACKET:
delp = strchr(value, '\0');
@@ -509,7 +509,7 @@ dconn_get_attributes(copyfunc func, const char *connect_string, ConnInfo *ci)
closep[1] == '\0')
break;
- for (const char *valuen = value; valuen < termp; closep = strchr(valuen, CLOSING_BRACKET))
+ for (valuen = value; valuen < termp; closep = strchr(valuen, CLOSING_BRACKET))
{
if (NULL == closep)
{
diff --git a/pgapi30.c b/pgapi30.c
index 8c045c8b..bfe04b17 100644
--- a/pgapi30.c
+++ b/pgapi30.c
@@ -1950,8 +1950,7 @@ RETCODE bulk_ope_callback(RETCODE retcode, void *para)
CSTR func = "bulk_ope_callback";
RETCODE ret = retcode;
bop_cdata *s = (bop_cdata *) para;
- SQLULEN offset, global_idx;
- SQLUINTEGER bind_size;
+ SQLULEN global_idx;
ConnectionClass *conn;
QResultClass *res;
IRDFields *irdflds;
@@ -1970,8 +1969,6 @@ RETCODE bulk_ope_callback(RETCODE retcode, void *para)
}
s->need_data_callback = FALSE;
bookmark = s->opts->bookmark;
- offset = s->opts->row_offset_ptr ? *(s->opts->row_offset_ptr) : 0;
- bind_size = s->opts->bind_size;
res = SC_get_Curres(s->stmt);
for (; SQL_ERROR != ret && s->idx < s->opts->size_of_rowset; s->idx++)
{
diff --git a/pgtypes.c b/pgtypes.c
index ccd84755..f2756c72 100644
--- a/pgtypes.c
+++ b/pgtypes.c
@@ -1251,7 +1251,6 @@ OID
sqltype_to_bind_pgtype(const ConnectionClass *conn, SQLSMALLINT fSqlType)
{
OID pgType;
- const ConnInfo *ci = &(conn->connInfo);
switch (fSqlType)
{
diff --git a/results.c b/results.c
index 71309e42..163e9c1d 100644
--- a/results.c
+++ b/results.c
@@ -3182,7 +3182,6 @@ SC_pos_reload_with_key(StatementClass *stmt, SQLULEN global_ridx, UInt2 *count,
}
else if (rcnt = (UInt2) QR_get_num_cached_tuples(qres), rcnt == 1)
{
- ConnectionClass *conn = SC_get_conn(stmt);
SQLLEN res_ridx;
switch (logKind)
@@ -3790,7 +3789,7 @@ irow_update(RETCODE ret, StatementClass *stmt, StatementClass *ustmt, SQLULEN gl
{
if (updcnt == 1)
{
- KeySet *keyset = NULL, keys;
+ KeySet keys;
if (NULL != tres->backend_tuples &&
1 == QR_get_num_cached_tuples(tres))
@@ -3836,7 +3835,6 @@ typedef struct
static RETCODE
pos_update_callback(RETCODE retcode, void *para)
{
- CSTR func = "pos_update_callback";
RETCODE ret = retcode;
pup_cdata *s = (pup_cdata *) para;
SQLLEN kres_ridx;
@@ -4960,7 +4958,6 @@ SC_fetch_by_bookmark(StatementClass *stmt)
{
PG_BM pg_bm;
SQLLEN bidx;
- BOOL idx_exist = FALSE;
pg_bm = SC_Resolve_bookmark(opts, i);
bidx = pg_bm.index;
[parent: 6bc6da49e217]