Fix clang warning

"a function declaration without a prototype is deprecated in all versions of C"
This commit is contained in:
Erik Ekman 2024-07-15 23:54:25 +02:00
parent 6be47466f2
commit 2c7940cf77
14 changed files with 26 additions and 26 deletions

View file

@ -103,7 +103,7 @@ static long send_query_recvcnt = 0;
static int hostname_maxlen = 0xFF; static int hostname_maxlen = 0xFF;
void void
client_init() client_init(void)
{ {
running = 1; running = 1;
rand_seed = ((unsigned int) rand()) & 0xFFFF; rand_seed = ((unsigned int) rand()) & 0xFFFF;
@ -124,13 +124,13 @@ client_init()
} }
void void
client_stop() client_stop(void)
{ {
running = 0; running = 0;
} }
enum connection enum connection
client_get_conn() client_get_conn(void)
{ {
return conn; return conn;
} }
@ -175,7 +175,7 @@ client_set_qtype(char *qtype)
} }
char * char *
client_get_qtype() client_get_qtype(void)
{ {
char *c = "UNDEFINED"; char *c = "UNDEFINED";
@ -225,7 +225,7 @@ client_set_hostname_maxlen(int i)
} }
const char * const char *
client_get_raw_addr() client_get_raw_addr(void)
{ {
return format_addr(&raw_serv, raw_serv_len); return format_addr(&raw_serv, raw_serv_len);
} }

View file

@ -276,7 +276,7 @@ do_pidfile(char *pidfile)
} }
void void
do_detach() do_detach(void)
{ {
#ifndef WINDOWS32 #ifndef WINDOWS32
fprintf(stderr, "Detaching from terminal...\n"); fprintf(stderr, "Detaching from terminal...\n");

View file

@ -20,7 +20,7 @@
static struct fw_query fwq[FW_QUERY_CACHE_SIZE]; static struct fw_query fwq[FW_QUERY_CACHE_SIZE];
static int fwq_ix; static int fwq_ix;
void fw_query_init() void fw_query_init(void)
{ {
memset(fwq, 0, sizeof(struct fw_query) * FW_QUERY_CACHE_SIZE); memset(fwq, 0, sizeof(struct fw_query) * FW_QUERY_CACHE_SIZE);
fwq_ix = 0; fwq_ix = 0;

View file

@ -119,7 +119,7 @@ START_TEST(test_base32_blksize)
END_TEST END_TEST
TCase * TCase *
test_base32_create_tests() test_base32_create_tests(void)
{ {
TCase *tc; TCase *tc;

View file

@ -132,7 +132,7 @@ START_TEST(test_base64_blksize)
END_TEST END_TEST
TCase * TCase *
test_base64_create_tests() test_base64_create_tests(void)
{ {
TCase *tc; TCase *tc;

View file

@ -281,7 +281,7 @@ START_TEST(test_parse_format_ipv4_mapped_ipv6)
END_TEST END_TEST
TCase * TCase *
test_common_create_tests() test_common_create_tests(void)
{ {
TCase *tc; TCase *tc;
int sock; int sock;

View file

@ -250,7 +250,7 @@ dump_packet(char *buf, size_t len)
} }
TCase * TCase *
test_dns_create_tests() test_dns_create_tests(void)
{ {
TCase *tc; TCase *tc;

View file

@ -93,7 +93,7 @@ START_TEST(test_build_hostname)
END_TEST END_TEST
TCase * TCase *
test_encoding_create_tests() test_encoding_create_tests(void)
{ {
TCase *tc; TCase *tc;

View file

@ -76,7 +76,7 @@ START_TEST(test_fw_query_edge)
END_TEST END_TEST
TCase * TCase *
test_fw_query_create_tests() test_fw_query_create_tests(void)
{ {
TCase *tc; TCase *tc;

View file

@ -59,7 +59,7 @@ START_TEST(test_login_hash_short)
END_TEST END_TEST
TCase * TCase *
test_login_create_tests() test_login_create_tests(void)
{ {
TCase *tc; TCase *tc;

View file

@ -270,7 +270,7 @@ END_TEST
TCase * TCase *
test_read_create_tests() test_read_create_tests(void)
{ {
TCase *tc; TCase *tc;

View file

@ -24,7 +24,7 @@
#include "test.h" #include "test.h"
int int
main() main(void)
{ {
SRunner *runner; SRunner *runner;
Suite *iodine; Suite *iodine;

View file

@ -18,15 +18,15 @@
#ifndef __TEST_H__ #ifndef __TEST_H__
#define __TEST_H__ #define __TEST_H__
TCase *test_base32_create_tests(); TCase *test_base32_create_tests(void);
TCase *test_base64_create_tests(); TCase *test_base64_create_tests(void);
TCase *test_common_create_tests(); TCase *test_common_create_tests(void);
TCase *test_dns_create_tests(); TCase *test_dns_create_tests(void);
TCase *test_encoding_create_tests(); TCase *test_encoding_create_tests(void);
TCase *test_read_create_tests(); TCase *test_read_create_tests(void);
TCase *test_login_create_tests(); TCase *test_login_create_tests(void);
TCase *test_user_create_tests(); TCase *test_user_create_tests(void);
TCase *test_fw_query_create_tests(); TCase *test_fw_query_create_tests(void);
char *va_str(const char *, ...); char *va_str(const char *, ...);

View file

@ -170,7 +170,7 @@ START_TEST(test_find_available_user_small_net)
END_TEST END_TEST
TCase * TCase *
test_user_create_tests() test_user_create_tests(void)
{ {
TCase *tc; TCase *tc;