remove old-style function declarations, and mark a function "static".
There are some remaining warnings, but this fixes most of them, anyway.
#include <pgtypes_interval.h>
int
-main()
+main(void)
{
exec sql begin declare section;
date date1;
*
* Copyright (c) 2000, Christof Petig <christof.petig@wtal.de>
*
- * $PostgreSQL: pgsql/src/interfaces/ecpg/test/dyntest.pgc,v 1.10 2003/11/29 19:52:09 pgsql Exp $
+ * $PostgreSQL: pgsql/src/interfaces/ecpg/test/dyntest.pgc,v 1.11 2005/06/30 07:08:59 neilc Exp $
*/
#include <stdio.h>
exec sql include sql3types;
exec sql include sqlca;
-static void error()
+static void error(void)
{ printf("#%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
exit(1);
}
*
* Copyright (c) 2000, Christof Petig <christof.petig@wtal.de>
*
- * $PostgreSQL: pgsql/src/interfaces/ecpg/test/dyntest2.pgc,v 1.5 2003/11/29 19:52:09 pgsql Exp $
+ * $PostgreSQL: pgsql/src/interfaces/ecpg/test/dyntest2.pgc,v 1.6 2005/06/30 07:08:59 neilc Exp $
*/
#include <stdio.h>
exec sql include sql3types;
exec sql include sqlca;
-static void error()
+static void error(void)
{
printf("\n#%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
exit(1);
#include <decimal.h>
int
-main()
+main(void)
{
char *text="error\n";
numeric *value1, *value2, *res;
}
int
-main ()
+main (void)
{
exec sql begin declare section;
long i;
typedef int intarray[AMOUNT];
int
-main ()
+main(void)
{
exec sql begin declare section;
exec sql ifdef NAMELEN;
select name, born, age, married, children from meskes;
int
-main ()
+main (void)
{
exec sql struct birthinfo { long born; short age; };
exec sql begin declare section;
#include <string.h>
int
-main ()
+main (void)
{
exec sql begin declare section;
typedef struct { long born; short age; } birthinfo;
exec sql include sqlca;
int
-main ()
+main (void)
{
EXEC SQL BEGIN DECLARE SECTION;
int i = 1;
};
EXEC SQL END DECLARE SECTION;
-int main()
+int main(void)
{
EXEC SQL BEGIN DECLARE SECTION;
struct TBempl empl;
EXEC SQL WHENEVER SQLERROR SQLPRINT;
int
-main()
+main(void)
{
EXEC SQL BEGIN DECLARE SECTION;
char *stmt1 = "INSERT INTO test1 VALUES (?, ?)";
#include "sqltypes.h"
-void openit(void);
+static void openit(void);
-int main()
+int main(void)
{
$int i = 14;
$decimal j, m, n;
return 0;
}
-void openit(void)
+static void openit(void)
{
$open c;
}
exec sql include sqlca;
-int fa() { return 2; }
+int fa(void) { return 2; }
int fb(int x) { return x; }
int fc(const char *x) { return *x; }
int fd(const char *x,int i) { return (*x)*i; }
};
#endif
-int main()
+int main(void)
{ struct sa x,*y;
exec sql begin declare section;
int a=(int)2;
}
for( n = 0; n < nthreads; n++ )
{
- pthread_create(&threads[n], NULL, test_thread, (void *)n + 1);
+ pthread_create(&threads[n], NULL, test_thread, (void *) (n + 1));
}
/* wait for thread completion */
}
for( n = 0; n < nthreads; n++ )
{
- pthread_create(&threads[n], NULL, test_thread, (void *)n + 1);
+ pthread_create(&threads[n], NULL, test_thread, (void *) (n + 1));
}
/* wait for thread completion */
exec sql include sqlca;
#include <stdlib.h>
-int main()
+int main(void)
{
exec sql begin declare section;
char **cpp=0;