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

Commit f1283ed

Browse files
committed
Fix a bunch of 'old-style parameter declaration' warnings induced by
writing 'foo()' rather than 'foo(void)'.
1 parent 8ec05b2 commit f1283ed

File tree

7 files changed

+27
-23
lines changed

7 files changed

+27
-23
lines changed

contrib/miscutil/misc_utils.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333

3434
int
35-
backend_pid()
35+
backend_pid(void)
3636
{
3737
return getpid();
3838
}

contrib/pg_autovacuum/pg_autovacuum.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Revisions by Christopher B. Browne, Liberty RMS
55
* Win32 Service code added by Dave Page
66
*
7-
* $PostgreSQL: pgsql/contrib/pg_autovacuum/pg_autovacuum.c,v 1.22 2004/10/16 21:50:02 tgl Exp $
7+
* $PostgreSQL: pgsql/contrib/pg_autovacuum/pg_autovacuum.c,v 1.23 2004/10/25 02:14:59 tgl Exp $
88
*/
99

1010
#include "postgres_fe.h"
@@ -192,7 +192,7 @@ log_entry(const char *logentry, int level)
192192
*/
193193
#ifndef WIN32
194194
static void
195-
daemonize()
195+
daemonize(void)
196196
{
197197
pid_t pid;
198198

@@ -552,7 +552,7 @@ print_table_info(tbl_info * tbl)
552552

553553
/* init_db_list() creates the db_list and initalizes template1 */
554554
static Dllist *
555-
init_db_list()
555+
init_db_list(void)
556556
{
557557
Dllist *db_list = DLNewList();
558558
db_info *dbs = NULL;
@@ -975,7 +975,7 @@ send_query(const char *query, db_info * dbi)
975975

976976

977977
static void
978-
free_cmd_args()
978+
free_cmd_args(void)
979979
{
980980
if (args != NULL)
981981
{
@@ -1109,7 +1109,7 @@ get_cmd_args(int argc, char *argv[])
11091109
}
11101110

11111111
static void
1112-
usage()
1112+
usage(void)
11131113
{
11141114
int i = 0;
11151115
float f = 0;
@@ -1151,7 +1151,7 @@ usage()
11511151
}
11521152

11531153
static void
1154-
print_cmd_args()
1154+
print_cmd_args(void)
11551155
{
11561156
sprintf(logbuffer, "Printing command_args");
11571157
log_entry(logbuffer, LVL_INFO);

contrib/pg_dumplo/main.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* -------------------------------------------------------------------------
22
* pg_dumplo
33
*
4-
* $PostgreSQL: pgsql/contrib/pg_dumplo/main.c,v 1.19 2003/11/29 19:51:35 pgsql Exp $
4+
* $PostgreSQL: pgsql/contrib/pg_dumplo/main.c,v 1.20 2004/10/25 02:15:00 tgl Exp $
55
*
66
* Karel Zak 1999-2000
77
* -------------------------------------------------------------------------
@@ -264,7 +264,7 @@ parse_lolist(LODumpMaster * pgLO)
264264

265265

266266
static void
267-
usage()
267+
usage(void)
268268
{
269269
printf("\npg_dumplo %s - PostgreSQL large objects dump\n", PG_VERSION);
270270
puts("pg_dumplo [option]\n\n"

contrib/pgbench/pgbench.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.33 2004/09/14 03:39:23 tgl Exp $
2+
* $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.34 2004/10/25 02:15:01 tgl Exp $
33
*
44
* pgbench: a simple TPC-B like benchmark program for PostgreSQL
55
* written by Tatsuo Ishii
@@ -107,7 +107,7 @@ typedef struct
107107
} CState;
108108

109109
static void
110-
usage()
110+
usage(void)
111111
{
112112
fprintf(stderr, "usage: pgbench [-h hostname][-p port][-c nclients][-t ntransactions][-s scaling_factor][-n][-C][-v][-S][-N][-l][-U login][-P password][-d][dbname]\n");
113113
fprintf(stderr, "(initialize mode): pgbench -i [-h hostname][-p port][-s scaling_factor][-U login][-P password][-d][dbname]\n");
@@ -122,7 +122,7 @@ getrand(int min, int max)
122122

123123
/* set up a connection to the backend */
124124
static PGconn *
125-
doConnect()
125+
doConnect(void)
126126
{
127127
PGconn *con;
128128
PGresult *res;

contrib/pgcrypto/crypt-des.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ ascii_to_bin(char ch)
216216
}
217217

218218
static void
219-
des_init()
219+
des_init(void)
220220
{
221221
int i,
222222
j,

contrib/pgcrypto/internal.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2727
* SUCH DAMAGE.
2828
*
29-
* $PostgreSQL: pgsql/contrib/pgcrypto/internal.c,v 1.13 2004/05/07 00:24:57 tgl Exp $
29+
* $PostgreSQL: pgsql/contrib/pgcrypto/internal.c,v 1.14 2004/10/25 02:15:02 tgl Exp $
3030
*/
3131

3232

@@ -493,25 +493,25 @@ bf_load(int mode)
493493
/* ciphers */
494494

495495
static PX_Cipher *
496-
rj_128_ecb()
496+
rj_128_ecb(void)
497497
{
498498
return rj_load(MODE_ECB);
499499
}
500500

501501
static PX_Cipher *
502-
rj_128_cbc()
502+
rj_128_cbc(void)
503503
{
504504
return rj_load(MODE_CBC);
505505
}
506506

507507
static PX_Cipher *
508-
bf_ecb_load()
508+
bf_ecb_load(void)
509509
{
510510
return bf_load(MODE_ECB);
511511
}
512512

513513
static PX_Cipher *
514-
bf_cbc_load()
514+
bf_cbc_load(void)
515515
{
516516
return bf_load(MODE_CBC);
517517
}

contrib/tsearch/dict/porter_english.dct

+9-5
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#ifdef DICT_BODY
2525
#include <ctype.h> /* tolower */
2626

27-
static void * setup_english_stemmer();
27+
static void * setup_english_stemmer(void);
2828

2929
static const char * english_stem(void * z, const char * q, int i0, int i1);
3030

@@ -1233,19 +1233,22 @@ find_english_stopword( unsigned char *buf, int len ) {
12331233
#undef ISFINISH
12341234

12351235
static int
1236-
is_stopengword(void* obj,char* word,int len) {
1236+
is_stopengword(void* obj,char* word,int len)
1237+
{
12371238
return ( len == find_english_stopword((unsigned char*)word, len) ) ? 1 : 0;
12381239
}
12391240

1240-
static void * setup_english_stemmer()
1241+
static void *
1242+
setup_english_stemmer(void)
12411243
{
12421244
struct english_stemmer * z = (struct english_stemmer *) malloc(sizeof(struct english_stemmer));
12431245
z->p = 0; z->p_size = 0;
12441246
z->irregulars = create_pool(irregular_forms);
12451247
return (void *) z;
12461248
}
12471249

1248-
static void closedown_english_stemmer(void * z_)
1250+
static void
1251+
closedown_english_stemmer(void * z_)
12491252
{
12501253
struct english_stemmer * z = (struct english_stemmer *) z_;
12511254
free_pool(z->irregulars);
@@ -1254,7 +1257,8 @@ static void closedown_english_stemmer(void * z_)
12541257
}
12551258

12561259
static char*
1257-
engstemming(void* obj, char *word, int *len) {
1260+
engstemming(void* obj, char *word, int *len)
1261+
{
12581262
struct english_stemmer * z = (struct english_stemmer *) obj;
12591263
const char* stemmed_word;
12601264
char *result = word;

0 commit comments

Comments
 (0)