diff options
| author | Tom Lane | 2000-03-18 18:57:16 +0000 |
|---|---|---|
| committer | Tom Lane | 2000-03-18 18:57:16 +0000 |
| commit | f91dd7880f28e881c62102c22f496afb547950c7 (patch) | |
| tree | 009c0c85e8ed8a1eef5906c2b0c77b6a7520e87b /src/interfaces/odbc | |
| parent | f945f46193690841315b79f5961d3721c73621d9 (diff) | |
Clean up minor compiler warnings.
Diffstat (limited to 'src/interfaces/odbc')
| -rw-r--r-- | src/interfaces/odbc/convert.c | 7 | ||||
| -rw-r--r-- | src/interfaces/odbc/misc.c | 28 | ||||
| -rw-r--r-- | src/interfaces/odbc/misc.h | 4 | ||||
| -rw-r--r-- | src/interfaces/odbc/options.c | 1 | ||||
| -rw-r--r-- | src/interfaces/odbc/pgtypes.c | 5 | ||||
| -rw-r--r-- | src/interfaces/odbc/results.c | 2 |
6 files changed, 20 insertions, 27 deletions
diff --git a/src/interfaces/odbc/convert.c b/src/interfaces/odbc/convert.c index 4cfe8d4567..cef75b258a 100644 --- a/src/interfaces/odbc/convert.c +++ b/src/interfaces/odbc/convert.c @@ -1372,10 +1372,9 @@ int convert_lo(StatementClass *stmt, void *value, Int2 fCType, PTR rgbValue, SDWORD cbValueMax, SDWORD *pcbValue) { -Oid oid; -int retval, result, left = -1; -int bind_row = stmt->bind_row; -BindInfoClass *bindInfo = NULL; + Oid oid; + int retval, result, left = -1; + BindInfoClass *bindInfo = NULL; /* If using SQLGetData, then current_col will be set */ diff --git a/src/interfaces/odbc/misc.c b/src/interfaces/odbc/misc.c index 7c0a18f965..2833a35353 100644 --- a/src/interfaces/odbc/misc.c +++ b/src/interfaces/odbc/misc.c @@ -13,7 +13,7 @@ */ #include <stdio.h> -#include <varargs.h> +#include <stdarg.h> #include <string.h> #include "psqlodbc.h" @@ -57,17 +57,14 @@ generate_filename(char* dirname,char* prefix,char* filename) #ifdef MY_LOG void -mylog(va_alist) -va_dcl +mylog(char * fmt, ...) { -char *fmt; -va_list args; -char filebuf[80]; + va_list args; + char filebuf[80]; FILE* LOGFP = globals.mylogFP; if ( globals.debug) { - va_start(args); - fmt = va_arg(args, char *); + va_start(args, fmt); if (! LOGFP) { generate_filename(MYLOGDIR,MYLOGFILE,filebuf); @@ -91,18 +88,15 @@ char filebuf[80]; #ifdef Q_LOG -void qlog(va_alist) -va_dcl +void +qlog(char * fmt, ...) { -char *fmt; -va_list args; -char filebuf[80]; -FILE* LOGFP = globals.qlogFP; + va_list args; + char filebuf[80]; + FILE* LOGFP = globals.qlogFP; if ( globals.commlog) { - va_start(args); - fmt = va_arg(args, char *); - + va_start(args, fmt); if (! LOGFP) { generate_filename(QLOGDIR,QLOGFILE,filebuf); diff --git a/src/interfaces/odbc/misc.h b/src/interfaces/odbc/misc.h index 10cb5114d1..0cbe92856b 100644 --- a/src/interfaces/odbc/misc.h +++ b/src/interfaces/odbc/misc.h @@ -45,7 +45,7 @@ #else #define MYLOGDIR "c:" #endif - void mylog(); /* prototype */ + extern void mylog(char * fmt, ...); #else #ifndef WIN32 #define mylog(args...) /* GNU convention for variable arguments */ @@ -61,7 +61,7 @@ #else #define QLOGDIR "c:" #endif - void qlog(); /* prototype */ + extern void qlog(char * fmt, ...); #else #ifndef WIN32 #define qlog(args...) /* GNU convention for variable arguments */ diff --git a/src/interfaces/odbc/options.c b/src/interfaces/odbc/options.c index ed34a1ca02..589a9de570 100644 --- a/src/interfaces/odbc/options.c +++ b/src/interfaces/odbc/options.c @@ -474,7 +474,6 @@ RETCODE SQL_API SQLSetStmtOption( { static char *func="SQLSetStmtOption"; StatementClass *stmt = (StatementClass *) hstmt; -char changed = FALSE; mylog("%s: entering...\n", func); diff --git a/src/interfaces/odbc/pgtypes.c b/src/interfaces/odbc/pgtypes.c index 3ee5e75c4e..2fedd8f5f9 100644 --- a/src/interfaces/odbc/pgtypes.c +++ b/src/interfaces/odbc/pgtypes.c @@ -177,6 +177,7 @@ Int4 pgType; break; default: + pgType = 0; /* ??? */ break; } @@ -310,7 +311,7 @@ char *pgtype_to_name(StatementClass *stmt, Int4 type) } } -Int2 +static Int2 getNumericScale(StatementClass *stmt, Int4 type, int col) { Int4 atttypmod; @@ -342,7 +343,7 @@ mylog("getNumericScale: type=%d, col=%d, unknown = %d\n", type,col); PG_NUMERIC_MAX_SCALE); } -Int4 +static Int4 getNumericPrecision(StatementClass *stmt, Int4 type, int col) { Int4 atttypmod; diff --git a/src/interfaces/odbc/results.c b/src/interfaces/odbc/results.c index a6703290f1..fe08167361 100644 --- a/src/interfaces/odbc/results.c +++ b/src/interfaces/odbc/results.c @@ -608,7 +608,7 @@ QResultClass *res; StatementClass *stmt = (StatementClass *) hstmt; int num_cols, num_rows; Int4 field_type; -void *value; +void *value = NULL; int result; char get_bookmark = FALSE; |
