mirror of
https://github.com/postgres/postgres.git
synced 2026-04-28 01:26:56 -04:00
Prevent -Wstrict-prototypes and -Wold-style-definition warnings
A following commit will enable -Wstrict-prototypes and -Wold-style-definition by default. This commit fixes the warnings that those new flags will generate before actually adding the new flags. Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Discussion: https://postgr.es/m/13d51b20-a69c-4ac1-8546-ec4fc278064f%40eisentraut.org
This commit is contained in:
parent
2f094e7ac6
commit
d7ad79e506
47 changed files with 49 additions and 49 deletions
|
|
@ -8,7 +8,7 @@ EXEC SQL BEGIN DECLARE SECTION;
|
|||
interval *interval_ptr;
|
||||
EXEC SQL END DECLARE SECTION;
|
||||
|
||||
int main()
|
||||
int main(void)
|
||||
{
|
||||
interval_ptr = (interval *) malloc(sizeof(interval));
|
||||
interval_ptr->time = 100000000;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ static void warn(void)
|
|||
should be fixed-length, blank-padded, then null-terminated.
|
||||
Conforms to the ANSI Fixed Character type. */
|
||||
|
||||
int main() {
|
||||
int main(void) {
|
||||
|
||||
EXEC SQL WHENEVER SQLWARNING do warn();
|
||||
EXEC SQL WHENEVER SQLERROR STOP;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#line 9 "intoasc.pgc"
|
||||
|
||||
|
||||
int main()
|
||||
int main(void)
|
||||
{
|
||||
interval_ptr = (interval *) malloc(sizeof(interval));
|
||||
interval_ptr->time = 100000000;
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ static void warn(void)
|
|||
should be fixed-length, blank-padded, then null-terminated.
|
||||
Conforms to the ANSI Fixed Character type. */
|
||||
|
||||
int main() {
|
||||
int main(void) {
|
||||
|
||||
/* exec sql whenever sql_warning do warn ( ) ; */
|
||||
#line 22 "char_array.pgc"
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ typedef struct {
|
|||
#line 27 "array_of_struct.pgc"
|
||||
|
||||
|
||||
int main()
|
||||
int main(void)
|
||||
{
|
||||
/* exec sql begin declare section */
|
||||
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ if (sqlca.sqlcode < 0) sqlprint();}
|
|||
|
||||
}
|
||||
|
||||
int main() {
|
||||
int main(void) {
|
||||
test();
|
||||
test(); /* retry */
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ typedef struct {
|
|||
#line 28 "pointer_to_struct.pgc"
|
||||
|
||||
|
||||
int main()
|
||||
int main(void)
|
||||
{
|
||||
/* exec sql begin declare section */
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ struct sqlca_t *ECPGget_sqlca(void);
|
|||
|
||||
|
||||
|
||||
int main()
|
||||
int main(void)
|
||||
{ /* exec sql begin declare section */
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ struct sqlca_t *ECPGget_sqlca(void);
|
|||
|
||||
|
||||
int
|
||||
main ()
|
||||
main(void)
|
||||
{
|
||||
ECPGdebug (1, stderr);
|
||||
|
||||
|
|
|
|||
|
|
@ -578,7 +578,7 @@ if (sqlca.sqlcode < 0) sqlprint();}
|
|||
printf("count: %d, length: %d, data: %s\n", count, length, f3[0]);
|
||||
}
|
||||
|
||||
void commitTable()
|
||||
void commitTable(void)
|
||||
{
|
||||
{ ECPGtrans(__LINE__, "con1", "commit");
|
||||
#line 187 "declare.pgc"
|
||||
|
|
@ -597,7 +597,7 @@ if (sqlca.sqlcode < 0) sqlprint();}
|
|||
/*
|
||||
* reset all the output variables
|
||||
*/
|
||||
void reset()
|
||||
void reset(void)
|
||||
{
|
||||
memset(f1, 0, sizeof(f1));
|
||||
memset(f2, 0, sizeof(f2));
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ error (void)
|
|||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
main(void)
|
||||
{
|
||||
/* exec sql begin declare section */
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
#line 5 "fetch.pgc"
|
||||
|
||||
|
||||
int main() {
|
||||
int main(void) {
|
||||
/* exec sql begin declare section */
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
#line 5 "func.pgc"
|
||||
|
||||
|
||||
int main() {
|
||||
int main(void) {
|
||||
|
||||
#line 8 "func.pgc"
|
||||
char text [ 25 ] ;
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ struct sqlca_t *ECPGget_sqlca(void);
|
|||
#line 4 "indicators.pgc"
|
||||
|
||||
|
||||
int main()
|
||||
int main(void)
|
||||
{
|
||||
/* exec sql begin declare section */
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
#line 5 "insupd.pgc"
|
||||
|
||||
|
||||
int main() {
|
||||
int main(void) {
|
||||
/* exec sql begin declare section */
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#line 6 "parser.pgc"
|
||||
|
||||
|
||||
int main() {
|
||||
int main(void) {
|
||||
/* exec sql begin declare section */
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
#line 5 "quote.pgc"
|
||||
|
||||
|
||||
int main() {
|
||||
int main(void) {
|
||||
/* exec sql begin declare section */
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
#line 5 "show.pgc"
|
||||
|
||||
|
||||
int main() {
|
||||
int main(void) {
|
||||
/* exec sql begin declare section */
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ struct sqlca_t *ECPGget_sqlca(void);
|
|||
|
||||
|
||||
int
|
||||
main ()
|
||||
main(void)
|
||||
{
|
||||
/* exec sql begin declare section */
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ struct sqlca_t *ECPGget_sqlca(void);
|
|||
|
||||
|
||||
int
|
||||
main ()
|
||||
main(void)
|
||||
{
|
||||
/* exec sql begin declare section */
|
||||
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ if (sqlca.sqlcode < 0) sqlprint();}
|
|||
return 0;
|
||||
}
|
||||
|
||||
int main ()
|
||||
int main(void)
|
||||
{
|
||||
intptr_t i;
|
||||
#ifdef WIN32
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ if (sqlca.sqlcode < 0) sqlprint();
|
|||
return 0;
|
||||
}
|
||||
|
||||
int main ()
|
||||
int main(void)
|
||||
{
|
||||
int i;
|
||||
#ifdef WIN32
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ if (sqlca.sqlcode < 0) sqlprint();}
|
|||
return 0;
|
||||
}
|
||||
|
||||
int main ()
|
||||
int main(void)
|
||||
{
|
||||
intptr_t i;
|
||||
#ifdef WIN32
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ void *test_thread(void *arg);
|
|||
int nthreads = 10;
|
||||
int iterations = 20;
|
||||
|
||||
int main()
|
||||
int main(void)
|
||||
{
|
||||
#ifndef WIN32
|
||||
pthread_t *threads;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ void *test_thread(void *arg);
|
|||
int nthreads = 10;
|
||||
int iterations = 20;
|
||||
|
||||
int main()
|
||||
int main(void)
|
||||
{
|
||||
#ifndef WIN32
|
||||
pthread_t *threads;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ EXEC SQL TYPE company IS
|
|||
customer customers[10];
|
||||
};
|
||||
|
||||
int main()
|
||||
int main(void)
|
||||
{
|
||||
EXEC SQL begin declare section;
|
||||
customer custs1[10];
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ static void test(void) {
|
|||
EXEC SQL DISCONNECT ALL;
|
||||
}
|
||||
|
||||
int main() {
|
||||
int main(void) {
|
||||
test();
|
||||
test(); /* retry */
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ EXEC SQL TYPE company IS
|
|||
customer *customers;
|
||||
};
|
||||
|
||||
int main()
|
||||
int main(void)
|
||||
{
|
||||
EXEC SQL begin declare section;
|
||||
customer *custs1 = (customer *) malloc(sizeof(customer) * 10);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ exec sql include sqlca;
|
|||
exec sql include ../regression;
|
||||
|
||||
|
||||
int main()
|
||||
int main(void)
|
||||
{ exec sql begin declare section;
|
||||
int index;
|
||||
exec sql end declare section;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ exec sql include ../regression;
|
|||
EXEC SQL WHENEVER SQLERROR sqlprint;
|
||||
|
||||
int
|
||||
main ()
|
||||
main(void)
|
||||
{
|
||||
ECPGdebug (1, stderr);
|
||||
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ void execute_test(void)
|
|||
printf("count: %d, length: %d, data: %s\n", count, length, f3[0]);
|
||||
}
|
||||
|
||||
void commitTable()
|
||||
void commitTable(void)
|
||||
{
|
||||
EXEC SQL AT con1 COMMIT;
|
||||
EXEC SQL AT con2 COMMIT;
|
||||
|
|
@ -191,7 +191,7 @@ void commitTable()
|
|||
/*
|
||||
* reset all the output variables
|
||||
*/
|
||||
void reset()
|
||||
void reset(void)
|
||||
{
|
||||
memset(f1, 0, sizeof(f1));
|
||||
memset(f2, 0, sizeof(f2));
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ error (void)
|
|||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
main(void)
|
||||
{
|
||||
exec sql begin declare section;
|
||||
int COUNT;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
EXEC SQL INCLUDE ../regression;
|
||||
|
||||
int main() {
|
||||
int main(void) {
|
||||
EXEC SQL BEGIN DECLARE SECTION;
|
||||
char str[25];
|
||||
int i, count=1, loopcount;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
EXEC SQL INCLUDE ../regression;
|
||||
|
||||
int main() {
|
||||
int main(void) {
|
||||
EXEC SQL char text[25];
|
||||
|
||||
ECPGdebug(1, stderr);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
exec sql include sqlca;
|
||||
exec sql include ../regression;
|
||||
|
||||
int main()
|
||||
int main(void)
|
||||
{
|
||||
exec sql begin declare section;
|
||||
int intvar = 5;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
EXEC SQL INCLUDE ../regression;
|
||||
|
||||
int main() {
|
||||
int main(void) {
|
||||
EXEC SQL BEGIN DECLARE SECTION;
|
||||
int i1[3], i2[3], i3[3], i4;
|
||||
EXEC SQL END DECLARE SECTION;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
/* test parser addition that merges two tokens into one */
|
||||
EXEC SQL INCLUDE ../regression;
|
||||
|
||||
int main() {
|
||||
int main(void) {
|
||||
EXEC SQL BEGIN DECLARE SECTION;
|
||||
int item[3], ind[3], i;
|
||||
EXEC SQL END DECLARE SECTION;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
EXEC SQL INCLUDE ../regression;
|
||||
|
||||
int main() {
|
||||
int main(void) {
|
||||
EXEC SQL BEGIN DECLARE SECTION;
|
||||
char var[25];
|
||||
int i, loopcount;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
EXEC SQL INCLUDE ../regression;
|
||||
|
||||
int main() {
|
||||
int main(void) {
|
||||
EXEC SQL BEGIN DECLARE SECTION;
|
||||
char var[25] = "public";
|
||||
EXEC SQL END DECLARE SECTION;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ exec sql include ../regression;
|
|||
EXEC SQL WHENEVER SQLERROR sqlprint;
|
||||
|
||||
int
|
||||
main ()
|
||||
main(void)
|
||||
{
|
||||
EXEC SQL BEGIN DECLARE SECTION;
|
||||
char json[1024];
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ exec sql include ../regression;
|
|||
EXEC SQL WHENEVER SQLERROR sqlprint;
|
||||
|
||||
int
|
||||
main ()
|
||||
main(void)
|
||||
{
|
||||
EXEC SQL BEGIN DECLARE SECTION;
|
||||
int foo;
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ static void* fn(void* arg)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int main ()
|
||||
int main(void)
|
||||
{
|
||||
intptr_t i;
|
||||
#ifdef WIN32
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ static void* fn(void* arg)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int main ()
|
||||
int main(void)
|
||||
{
|
||||
int i;
|
||||
#ifdef WIN32
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ static void* fn(void* arg)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int main ()
|
||||
int main(void)
|
||||
{
|
||||
intptr_t i;
|
||||
#ifdef WIN32
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ void *test_thread(void *arg);
|
|||
int nthreads = 10;
|
||||
int iterations = 20;
|
||||
|
||||
int main()
|
||||
int main(void)
|
||||
{
|
||||
#ifndef WIN32
|
||||
pthread_t *threads;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ void *test_thread(void *arg);
|
|||
int nthreads = 10;
|
||||
int iterations = 20;
|
||||
|
||||
int main()
|
||||
int main(void)
|
||||
{
|
||||
#ifndef WIN32
|
||||
pthread_t *threads;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
#include "libpq-fe.h"
|
||||
|
||||
static void
|
||||
print_ssl_library()
|
||||
print_ssl_library(void)
|
||||
{
|
||||
const char *lib = PQsslAttribute(NULL, "library");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue