Skip to content

Commit

Permalink
Fix clang warning
Browse files Browse the repository at this point in the history
"a function declaration without a prototype is deprecated in all versions of C"
  • Loading branch information
yarrick committed Jul 15, 2024
1 parent 6be4746 commit 2c7940c
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 26 deletions.
10 changes: 5 additions & 5 deletions src/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ static long send_query_recvcnt = 0;
static int hostname_maxlen = 0xFF;

void
client_init()
client_init(void)
{
running = 1;
rand_seed = ((unsigned int) rand()) & 0xFFFF;
Expand All @@ -124,13 +124,13 @@ client_init()
}

void
client_stop()
client_stop(void)
{
running = 0;
}

enum connection
client_get_conn()
client_get_conn(void)
{
return conn;
}
Expand Down Expand Up @@ -175,7 +175,7 @@ client_set_qtype(char *qtype)
}

char *
client_get_qtype()
client_get_qtype(void)
{
char *c = "UNDEFINED";

Expand Down Expand Up @@ -225,7 +225,7 @@ client_set_hostname_maxlen(int i)
}

const char *
client_get_raw_addr()
client_get_raw_addr(void)
{
return format_addr(&raw_serv, raw_serv_len);
}
Expand Down
2 changes: 1 addition & 1 deletion src/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ do_pidfile(char *pidfile)
}

void
do_detach()
do_detach(void)
{
#ifndef WINDOWS32
fprintf(stderr, "Detaching from terminal...\n");
Expand Down
2 changes: 1 addition & 1 deletion src/fw_query.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
static struct fw_query fwq[FW_QUERY_CACHE_SIZE];
static int fwq_ix;

void fw_query_init()
void fw_query_init(void)
{
memset(fwq, 0, sizeof(struct fw_query) * FW_QUERY_CACHE_SIZE);
fwq_ix = 0;
Expand Down
2 changes: 1 addition & 1 deletion tests/base32.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ START_TEST(test_base32_blksize)
END_TEST

TCase *
test_base32_create_tests()
test_base32_create_tests(void)
{
TCase *tc;

Expand Down
2 changes: 1 addition & 1 deletion tests/base64.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ START_TEST(test_base64_blksize)
END_TEST

TCase *
test_base64_create_tests()
test_base64_create_tests(void)
{
TCase *tc;

Expand Down
2 changes: 1 addition & 1 deletion tests/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ START_TEST(test_parse_format_ipv4_mapped_ipv6)
END_TEST

TCase *
test_common_create_tests()
test_common_create_tests(void)
{
TCase *tc;
int sock;
Expand Down
2 changes: 1 addition & 1 deletion tests/dns.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ dump_packet(char *buf, size_t len)
}

TCase *
test_dns_create_tests()
test_dns_create_tests(void)
{
TCase *tc;

Expand Down
2 changes: 1 addition & 1 deletion tests/encoding.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ START_TEST(test_build_hostname)
END_TEST

TCase *
test_encoding_create_tests()
test_encoding_create_tests(void)
{
TCase *tc;

Expand Down
2 changes: 1 addition & 1 deletion tests/fw_query.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ START_TEST(test_fw_query_edge)
END_TEST

TCase *
test_fw_query_create_tests()
test_fw_query_create_tests(void)
{
TCase *tc;

Expand Down
2 changes: 1 addition & 1 deletion tests/login.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ START_TEST(test_login_hash_short)
END_TEST

TCase *
test_login_create_tests()
test_login_create_tests(void)
{
TCase *tc;

Expand Down
2 changes: 1 addition & 1 deletion tests/read.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ END_TEST


TCase *
test_read_create_tests()
test_read_create_tests(void)
{
TCase *tc;

Expand Down
2 changes: 1 addition & 1 deletion tests/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "test.h"

int
main()
main(void)
{
SRunner *runner;
Suite *iodine;
Expand Down
18 changes: 9 additions & 9 deletions tests/test.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
#ifndef __TEST_H__
#define __TEST_H__

TCase *test_base32_create_tests();
TCase *test_base64_create_tests();
TCase *test_common_create_tests();
TCase *test_dns_create_tests();
TCase *test_encoding_create_tests();
TCase *test_read_create_tests();
TCase *test_login_create_tests();
TCase *test_user_create_tests();
TCase *test_fw_query_create_tests();
TCase *test_base32_create_tests(void);
TCase *test_base64_create_tests(void);
TCase *test_common_create_tests(void);
TCase *test_dns_create_tests(void);
TCase *test_encoding_create_tests(void);
TCase *test_read_create_tests(void);
TCase *test_login_create_tests(void);
TCase *test_user_create_tests(void);
TCase *test_fw_query_create_tests(void);

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

Expand Down
2 changes: 1 addition & 1 deletion tests/user.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ START_TEST(test_find_available_user_small_net)
END_TEST

TCase *
test_user_create_tests()
test_user_create_tests(void)
{
TCase *tc;

Expand Down

0 comments on commit 2c7940c

Please sign in to comment.