Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf91dd78

Browse files
committed
Clean up minor compiler warnings.
1 parentf945f46 commitf91dd78

File tree

8 files changed

+24
-31
lines changed

8 files changed

+24
-31
lines changed

‎src/backend/utils/adt/pg_locale.c

Lines changed: 2 additions & 2 deletions
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
structlconv*
112-
PGLC_localeconv()
112+
PGLC_localeconv(void)
113113
{
114114
PG_LocaleCategorieslc;
115115
structlconv*lconv;

‎src/include/utils/pg_locale.h

Lines changed: 2 additions & 2 deletions
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-
externstructlconv*PGLC_localeconv();
46+
externstructlconv*PGLC_localeconv(void);
4747

4848

4949
#endif/* USE_LOCALE */

‎src/interfaces/odbc/convert.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1372,10 +1372,9 @@ int
13721372
convert_lo(StatementClass*stmt,void*value,Int2fCType,PTRrgbValue,
13731373
SDWORDcbValueMax,SDWORD*pcbValue)
13741374
{
1375-
Oidoid;
1376-
intretval,result,left=-1;
1377-
intbind_row=stmt->bind_row;
1378-
BindInfoClass*bindInfo=NULL;
1375+
Oidoid;
1376+
intretval,result,left=-1;
1377+
BindInfoClass*bindInfo=NULL;
13791378

13801379

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

‎src/interfaces/odbc/misc.c

Lines changed: 11 additions & 17 deletions
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
#ifdefMY_LOG
5858

5959
void
60-
mylog(va_alist)
61-
va_dcl
60+
mylog(char*fmt, ...)
6261
{
63-
char*fmt;
64-
va_listargs;
65-
charfilebuf[80];
62+
va_listargs;
63+
charfilebuf[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
#ifdefQ_LOG
9390

94-
voidqlog(va_alist)
95-
va_dcl
91+
void
92+
qlog(char*fmt, ...)
9693
{
97-
char*fmt;
98-
va_listargs;
99-
charfilebuf[80];
100-
FILE*LOGFP=globals.qlogFP;
94+
va_listargs;
95+
charfilebuf[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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
#else
4646
#defineMYLOGDIR"c:"
4747
#endif
48-
voidmylog();/* prototype */
48+
externvoidmylog(char*fmt, ...);
4949
#else
5050
#ifndefWIN32
5151
#definemylog(args...)/* GNU convention for variable arguments */
@@ -61,7 +61,7 @@
6161
#else
6262
#defineQLOGDIR"c:"
6363
#endif
64-
voidqlog();/* prototype */
64+
externvoidqlog(char*fmt, ...);
6565
#else
6666
#ifndefWIN32
6767
#defineqlog(args...)/* GNU convention for variable arguments */

‎src/interfaces/odbc/options.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,6 @@ RETCODE SQL_API SQLSetStmtOption(
474474
{
475475
staticchar*func="SQLSetStmtOption";
476476
StatementClass*stmt= (StatementClass*)hstmt;
477-
charchanged= FALSE;
478477

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

‎src/interfaces/odbc/pgtypes.c

Lines changed: 3 additions & 2 deletions
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+
staticInt2
314315
getNumericScale(StatementClass*stmt,Int4type,intcol)
315316
{
316317
Int4atttypmod;
@@ -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+
staticInt4
346347
getNumericPrecision(StatementClass*stmt,Int4type,intcol)
347348
{
348349
Int4atttypmod;

‎src/interfaces/odbc/results.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ QResultClass *res;
608608
StatementClass*stmt= (StatementClass*)hstmt;
609609
intnum_cols,num_rows;
610610
Int4field_type;
611-
void*value;
611+
void*value=NULL;
612612
intresult;
613613
charget_bookmark= FALSE;
614614

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp