Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f91dd78

Browse files
committed
Clean up minor compiler warnings.
1 parent f945f46 commit f91dd78

File tree

8 files changed

+24
-31
lines changed

8 files changed

+24
-31
lines changed

src/backend/utils/adt/pg_locale.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/* -----------------------------------------------------------------------
33
* pg_locale.c
44
*
5-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/pg_locale.c,v 1.2 2000/02/08 15:56:55 momjian Exp $
5+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/pg_locale.c,v 1.3 2000/03/18 18:57:14 tgl Exp $
66
*
77
*
88
* Portions Copyright (c) 1999-2000, PostgreSQL, Inc
@@ -109,7 +109,7 @@ PGLC_setlocale( PG_LocaleCategories *lc )
109109
*------
110110
*/
111111
struct lconv *
112-
PGLC_localeconv()
112+
PGLC_localeconv(void)
113113
{
114114
PG_LocaleCategories lc;
115115
struct lconv *lconv;

src/include/utils/pg_locale.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/* -----------------------------------------------------------------------
33
* pg_locale.h
44
*
5-
* $Header: /cvsroot/pgsql/src/include/utils/pg_locale.h,v 1.2 2000/02/08 15:57:01 momjian Exp $
5+
* $Header: /cvsroot/pgsql/src/include/utils/pg_locale.h,v 1.3 2000/03/18 18:57:15 tgl Exp $
66
*
77
*
88
* Portions Copyright (c) 1999-2000, PostgreSQL, Inc
@@ -43,7 +43,7 @@ extern PG_LocaleCategories *PGLC_setlocale( PG_LocaleCategories *lc );
4343
* on current locale catogories setting - in contrast to standard localeconv().
4444
*------
4545
*/
46-
extern struct lconv *PGLC_localeconv();
46+
extern struct lconv *PGLC_localeconv(void);
4747

4848

4949
#endif /* USE_LOCALE */

src/interfaces/odbc/convert.c

+3-4
Original file line numberDiff line numberDiff line change
@@ -1372,10 +1372,9 @@ int
13721372
convert_lo(StatementClass *stmt, void *value, Int2 fCType, PTR rgbValue,
13731373
SDWORD cbValueMax, SDWORD *pcbValue)
13741374
{
1375-
Oid oid;
1376-
int retval, result, left = -1;
1377-
int bind_row = stmt->bind_row;
1378-
BindInfoClass *bindInfo = NULL;
1375+
Oid oid;
1376+
int retval, result, left = -1;
1377+
BindInfoClass *bindInfo = NULL;
13791378

13801379

13811380
/* If using SQLGetData, then current_col will be set */

src/interfaces/odbc/misc.c

+11-17
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*/
1414

1515
#include <stdio.h>
16-
#include <varargs.h>
16+
#include <stdarg.h>
1717
#include <string.h>
1818

1919
#include "psqlodbc.h"
@@ -57,17 +57,14 @@ generate_filename(char* dirname,char* prefix,char* filename)
5757
#ifdef MY_LOG
5858

5959
void
60-
mylog(va_alist)
61-
va_dcl
60+
mylog(char * fmt, ...)
6261
{
63-
char *fmt;
64-
va_list args;
65-
char filebuf[80];
62+
va_list args;
63+
char filebuf[80];
6664
FILE* LOGFP = globals.mylogFP;
6765

6866
if ( globals.debug) {
69-
va_start(args);
70-
fmt = va_arg(args, char *);
67+
va_start(args, fmt);
7168

7269
if (! LOGFP) {
7370
generate_filename(MYLOGDIR,MYLOGFILE,filebuf);
@@ -91,18 +88,15 @@ char filebuf[80];
9188

9289
#ifdef Q_LOG
9390

94-
void qlog(va_alist)
95-
va_dcl
91+
void
92+
qlog(char * fmt, ...)
9693
{
97-
char *fmt;
98-
va_list args;
99-
char filebuf[80];
100-
FILE* LOGFP = globals.qlogFP;
94+
va_list args;
95+
char filebuf[80];
96+
FILE* LOGFP = globals.qlogFP;
10197

10298
if ( globals.commlog) {
103-
va_start(args);
104-
fmt = va_arg(args, char *);
105-
99+
va_start(args, fmt);
106100

107101
if (! LOGFP) {
108102
generate_filename(QLOGDIR,QLOGFILE,filebuf);

src/interfaces/odbc/misc.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
#else
4646
#define MYLOGDIR "c:"
4747
#endif
48-
void mylog(); /* prototype */
48+
extern void mylog(char * fmt, ...);
4949
#else
5050
#ifndef WIN32
5151
#define mylog(args...) /* GNU convention for variable arguments */
@@ -61,7 +61,7 @@
6161
#else
6262
#define QLOGDIR "c:"
6363
#endif
64-
void qlog(); /* prototype */
64+
extern void qlog(char * fmt, ...);
6565
#else
6666
#ifndef WIN32
6767
#define qlog(args...) /* GNU convention for variable arguments */

src/interfaces/odbc/options.c

-1
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,6 @@ RETCODE SQL_API SQLSetStmtOption(
474474
{
475475
static char *func="SQLSetStmtOption";
476476
StatementClass *stmt = (StatementClass *) hstmt;
477-
char changed = FALSE;
478477

479478
mylog("%s: entering...\n", func);
480479

src/interfaces/odbc/pgtypes.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ Int4 pgType;
177177
break;
178178

179179
default:
180+
pgType = 0; /* ??? */
180181
break;
181182
}
182183

@@ -310,7 +311,7 @@ char *pgtype_to_name(StatementClass *stmt, Int4 type)
310311
}
311312
}
312313

313-
Int2
314+
static Int2
314315
getNumericScale(StatementClass *stmt, Int4 type, int col)
315316
{
316317
Int4 atttypmod;
@@ -342,7 +343,7 @@ mylog("getNumericScale: type=%d, col=%d, unknown = %d\n", type,col);
342343
PG_NUMERIC_MAX_SCALE);
343344
}
344345

345-
Int4
346+
static Int4
346347
getNumericPrecision(StatementClass *stmt, Int4 type, int col)
347348
{
348349
Int4 atttypmod;

src/interfaces/odbc/results.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ QResultClass *res;
608608
StatementClass *stmt = (StatementClass *) hstmt;
609609
int num_cols, num_rows;
610610
Int4 field_type;
611-
void *value;
611+
void *value = NULL;
612612
int result;
613613
char get_bookmark = FALSE;
614614

0 commit comments

Comments
 (0)