From d6d5680249cbaeeb046f6c91124f6aaced27e95e Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com> Date: Thu, 25 May 2023 17:35:26 +0200 Subject: [PATCH] Bad function definition - int main() should be int main(void) Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com> --- tests/ban-ips.c | 2 +- tests/html-escape.c | 2 +- tests/human_addr.c | 2 +- tests/ipv4-prefix.c | 2 +- tests/ipv6-prefix.c | 2 +- tests/json-escape.c | 2 +- tests/kkdcp-parsing.c | 2 +- tests/port-parsing.c | 2 +- tests/str-test.c | 2 +- tests/str-test2.c | 2 +- tests/url-escape.c | 2 +- tests/valid-hostname.c | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/ban-ips.c b/tests/ban-ips.c index 541f98e5..bc7f3d03 100644 --- a/tests/ban-ips.c +++ b/tests/ban-ips.c @@ -52,7 +52,7 @@ unsigned check_if_banned_str(main_server_st *s, const char *ip) return check_if_banned(s, &addr, addr.ss_family==AF_INET?sizeof(struct sockaddr_in):sizeof(struct sockaddr_in6)); } -int main() +int main(void) { main_server_st *s = talloc(NULL, struct main_server_st); vhost_cfg_st *vhost; diff --git a/tests/html-escape.c b/tests/html-escape.c index 4956f212..c5be1179 100644 --- a/tests/html-escape.c +++ b/tests/html-escape.c @@ -54,7 +54,7 @@ static char *encoded_strings[] = "Ahoy matey!" }; -int main() +int main(void) { char *dec; unsigned i; diff --git a/tests/human_addr.c b/tests/human_addr.c index cd6d191f..7462e17c 100644 --- a/tests/human_addr.c +++ b/tests/human_addr.c @@ -106,7 +106,7 @@ static void check_port(const char *ip, unsigned port) } } -int main() +int main(void) { check("172.18.52.43"); check("192.168.1.1"); diff --git a/tests/ipv4-prefix.c b/tests/ipv4-prefix.c index 7052e697..e6fcfce7 100644 --- a/tests/ipv4-prefix.c +++ b/tests/ipv4-prefix.c @@ -23,7 +23,7 @@ #include "../src/ip-util.h" #include "../src/ip-util.c" -int main() +int main(void) { char *p; diff --git a/tests/ipv6-prefix.c b/tests/ipv6-prefix.c index 5cc77cf2..2799a8b8 100644 --- a/tests/ipv6-prefix.c +++ b/tests/ipv6-prefix.c @@ -36,7 +36,7 @@ static char* my_ipv6_prefix_to_mask(char str[MAX_IP_STR], unsigned prefix) return str; } -int main() +int main(void) { char *p; char str[MAX_IP_STR]; diff --git a/tests/json-escape.c b/tests/json-escape.c index c12083ab..a1ffd8ab 100644 --- a/tests/json-escape.c +++ b/tests/json-escape.c @@ -46,7 +46,7 @@ static char *encoded_strings[] = "\\u0009big pile \\u0008\\u0008 of stuff\\u000d\\u000a" }; -int main() +int main(void) { char tmp[512]; char *p; diff --git a/tests/kkdcp-parsing.c b/tests/kkdcp-parsing.c index 4c4eb6eb..87eed35f 100644 --- a/tests/kkdcp-parsing.c +++ b/tests/kkdcp-parsing.c @@ -27,7 +27,7 @@ #include "../src/common-config.h" #include "../src/config-kkdcp.c" -int main() +int main(void) { #ifndef HAVE_GSSAPI exit(77); diff --git a/tests/port-parsing.c b/tests/port-parsing.c index a5b14214..3c1ccb30 100644 --- a/tests/port-parsing.c +++ b/tests/port-parsing.c @@ -60,7 +60,7 @@ void check_vals(FwPortSt **fw_ports, size_t n_fw_ports) { } } -int main() +int main(void) { char p[256]; int ret; diff --git a/tests/str-test.c b/tests/str-test.c index 4632d27c..e751283e 100644 --- a/tests/str-test.c +++ b/tests/str-test.c @@ -30,7 +30,7 @@ static char *myfunc(void *pool, const char *str) } #define STR1 "hi there people. How are you?" -int main() +int main(void) { str_st str; str_rep_tab tab[16]; diff --git a/tests/str-test2.c b/tests/str-test2.c index e07fc485..870a060b 100644 --- a/tests/str-test2.c +++ b/tests/str-test2.c @@ -25,7 +25,7 @@ #include "../src/str.c" #define STR1 " hi there people. How are you?" -int main() +int main(void) { char str[64]; diff --git a/tests/url-escape.c b/tests/url-escape.c index 6b93c1d7..3b5a3883 100644 --- a/tests/url-escape.c +++ b/tests/url-escape.c @@ -40,7 +40,7 @@ static char *decoded_strings[] = "Laguna%+@Beach" }; -int main() +int main(void) { char *dec, *url; unsigned i; diff --git a/tests/valid-hostname.c b/tests/valid-hostname.c index a6287ece..f35e19fb 100644 --- a/tests/valid-hostname.c +++ b/tests/valid-hostname.c @@ -27,7 +27,7 @@ * as expected. */ -int main() +int main(void) { /* check invalid hostnames */ assert(valid_hostname("192.168.1.1") == 0);