Skip to content

Commit 4802bb5

Browse files
author
Neil Conway
committed
Warning cleanups for ecpg tests. Avoid doing pointer arithmetic on void *,
remove old-style function declarations, and mark a function "static". There are some remaining warnings, but this fixes most of them, anyway.
1 parent 175c25a commit 4802bb5

16 files changed

+21
-21
lines changed

src/interfaces/ecpg/test/dt_test.pgc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <pgtypes_interval.h>
77

88
int
9-
main()
9+
main(void)
1010
{
1111
exec sql begin declare section;
1212
date date1;

src/interfaces/ecpg/test/dyntest.pgc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
*
33
* Copyright (c) 2000, Christof Petig <christof.petig@wtal.de>
44
*
5-
* $PostgreSQL: pgsql/src/interfaces/ecpg/test/dyntest.pgc,v 1.10 2003/11/29 19:52:09 pgsql Exp $
5+
* $PostgreSQL: pgsql/src/interfaces/ecpg/test/dyntest.pgc,v 1.11 2005/06/30 07:08:59 neilc Exp $
66
*/
77

88
#include <stdio.h>
@@ -12,7 +12,7 @@
1212
exec sql include sql3types;
1313
exec sql include sqlca;
1414

15-
static void error()
15+
static void error(void)
1616
{ printf("#%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
1717
exit(1);
1818
}

src/interfaces/ecpg/test/dyntest2.pgc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
*
33
* Copyright (c) 2000, Christof Petig <christof.petig@wtal.de>
44
*
5-
* $PostgreSQL: pgsql/src/interfaces/ecpg/test/dyntest2.pgc,v 1.5 2003/11/29 19:52:09 pgsql Exp $
5+
* $PostgreSQL: pgsql/src/interfaces/ecpg/test/dyntest2.pgc,v 1.6 2005/06/30 07:08:59 neilc Exp $
66
*/
77

88
#include <stdio.h>
@@ -11,7 +11,7 @@
1111
exec sql include sql3types;
1212
exec sql include sqlca;
1313

14-
static void error()
14+
static void error(void)
1515
{
1616
printf("\n#%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
1717
exit(1);

src/interfaces/ecpg/test/num_test.pgc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <decimal.h>
44

55
int
6-
main()
6+
main(void)
77
{
88
char *text="error\n";
99
numeric *value1, *value2, *res;

src/interfaces/ecpg/test/perftest.pgc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ print_result(long sec, long usec, char *text)
2121
}
2222

2323
int
24-
main ()
24+
main (void)
2525
{
2626
exec sql begin declare section;
2727
long i;

src/interfaces/ecpg/test/test1.pgc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ exec sql type intarray is int[AMOUNT];
2727
typedef int intarray[AMOUNT];
2828

2929
int
30-
main ()
30+
main(void)
3131
{
3232
exec sql begin declare section;
3333
exec sql ifdef NAMELEN;

src/interfaces/ecpg/test/test2.pgc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ exec sql declare cur cursor for
1616
select name, born, age, married, children from meskes;
1717

1818
int
19-
main ()
19+
main (void)
2020
{
2121
exec sql struct birthinfo { long born; short age; };
2222
exec sql begin declare section;

src/interfaces/ecpg/test/test3.pgc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ exec sql type str is varchar[10];
99
#include <string.h>
1010

1111
int
12-
main ()
12+
main (void)
1313
{
1414
exec sql begin declare section;
1515
typedef struct { long born; short age; } birthinfo;

src/interfaces/ecpg/test/test4.pgc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ exec sql whenever sqlerror sqlprint;
77
exec sql include sqlca;
88

99
int
10-
main ()
10+
main (void)
1111
{
1212
EXEC SQL BEGIN DECLARE SECTION;
1313
int i = 1;

src/interfaces/ecpg/test/test5.pgc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ struct TBempl
1414
};
1515
EXEC SQL END DECLARE SECTION;
1616

17-
int main()
17+
int main(void)
1818
{
1919
EXEC SQL BEGIN DECLARE SECTION;
2020
struct TBempl empl;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy