Skip to content

Commit 2c7940c

Browse files
committed
Fix clang warning
"a function declaration without a prototype is deprecated in all versions of C"
1 parent 6be4746 commit 2c7940c

14 files changed

+26
-26
lines changed

src/client.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ static long send_query_recvcnt = 0;
103103
static int hostname_maxlen = 0xFF;
104104

105105
void
106-
client_init()
106+
client_init(void)
107107
{
108108
running = 1;
109109
rand_seed = ((unsigned int) rand()) & 0xFFFF;
@@ -124,13 +124,13 @@ client_init()
124124
}
125125

126126
void
127-
client_stop()
127+
client_stop(void)
128128
{
129129
running = 0;
130130
}
131131

132132
enum connection
133-
client_get_conn()
133+
client_get_conn(void)
134134
{
135135
return conn;
136136
}
@@ -175,7 +175,7 @@ client_set_qtype(char *qtype)
175175
}
176176

177177
char *
178-
client_get_qtype()
178+
client_get_qtype(void)
179179
{
180180
char *c = "UNDEFINED";
181181

@@ -225,7 +225,7 @@ client_set_hostname_maxlen(int i)
225225
}
226226

227227
const char *
228-
client_get_raw_addr()
228+
client_get_raw_addr(void)
229229
{
230230
return format_addr(&raw_serv, raw_serv_len);
231231
}

src/common.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ do_pidfile(char *pidfile)
276276
}
277277

278278
void
279-
do_detach()
279+
do_detach(void)
280280
{
281281
#ifndef WINDOWS32
282282
fprintf(stderr, "Detaching from terminal...\n");

src/fw_query.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
static struct fw_query fwq[FW_QUERY_CACHE_SIZE];
2121
static int fwq_ix;
2222

23-
void fw_query_init()
23+
void fw_query_init(void)
2424
{
2525
memset(fwq, 0, sizeof(struct fw_query) * FW_QUERY_CACHE_SIZE);
2626
fwq_ix = 0;

tests/base32.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ START_TEST(test_base32_blksize)
119119
END_TEST
120120

121121
TCase *
122-
test_base32_create_tests()
122+
test_base32_create_tests(void)
123123
{
124124
TCase *tc;
125125

tests/base64.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ START_TEST(test_base64_blksize)
132132
END_TEST
133133

134134
TCase *
135-
test_base64_create_tests()
135+
test_base64_create_tests(void)
136136
{
137137
TCase *tc;
138138

tests/common.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ START_TEST(test_parse_format_ipv4_mapped_ipv6)
281281
END_TEST
282282

283283
TCase *
284-
test_common_create_tests()
284+
test_common_create_tests(void)
285285
{
286286
TCase *tc;
287287
int sock;

tests/dns.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ dump_packet(char *buf, size_t len)
250250
}
251251

252252
TCase *
253-
test_dns_create_tests()
253+
test_dns_create_tests(void)
254254
{
255255
TCase *tc;
256256

tests/encoding.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ START_TEST(test_build_hostname)
9393
END_TEST
9494

9595
TCase *
96-
test_encoding_create_tests()
96+
test_encoding_create_tests(void)
9797
{
9898
TCase *tc;
9999

tests/fw_query.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ START_TEST(test_fw_query_edge)
7676
END_TEST
7777

7878
TCase *
79-
test_fw_query_create_tests()
79+
test_fw_query_create_tests(void)
8080
{
8181
TCase *tc;
8282

tests/login.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ START_TEST(test_login_hash_short)
5959
END_TEST
6060

6161
TCase *
62-
test_login_create_tests()
62+
test_login_create_tests(void)
6363
{
6464
TCase *tc;
6565

tests/read.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ END_TEST
270270

271271

272272
TCase *
273-
test_read_create_tests()
273+
test_read_create_tests(void)
274274
{
275275
TCase *tc;
276276

tests/test.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include "test.h"
2525

2626
int
27-
main()
27+
main(void)
2828
{
2929
SRunner *runner;
3030
Suite *iodine;

tests/test.h

+9-9
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
#ifndef __TEST_H__
1919
#define __TEST_H__
2020

21-
TCase *test_base32_create_tests();
22-
TCase *test_base64_create_tests();
23-
TCase *test_common_create_tests();
24-
TCase *test_dns_create_tests();
25-
TCase *test_encoding_create_tests();
26-
TCase *test_read_create_tests();
27-
TCase *test_login_create_tests();
28-
TCase *test_user_create_tests();
29-
TCase *test_fw_query_create_tests();
21+
TCase *test_base32_create_tests(void);
22+
TCase *test_base64_create_tests(void);
23+
TCase *test_common_create_tests(void);
24+
TCase *test_dns_create_tests(void);
25+
TCase *test_encoding_create_tests(void);
26+
TCase *test_read_create_tests(void);
27+
TCase *test_login_create_tests(void);
28+
TCase *test_user_create_tests(void);
29+
TCase *test_fw_query_create_tests(void);
3030

3131
char *va_str(const char *, ...);
3232

tests/user.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ START_TEST(test_find_available_user_small_net)
170170
END_TEST
171171

172172
TCase *
173-
test_user_create_tests()
173+
test_user_create_tests(void)
174174
{
175175
TCase *tc;
176176

0 commit comments

Comments
 (0)