Use void in all function definitions that do not take any arguments

Reviewed-by: Rich Salz <rsalz@openssl.org>
GH: #6208
diff --git a/test/asynciotest.c b/test/asynciotest.c
index 54961b2..73e415f 100644
--- a/test/asynciotest.c
+++ b/test/asynciotest.c
@@ -42,7 +42,7 @@
     unsigned int wctr;
 };
 
-static const BIO_METHOD *bio_f_async_filter()
+static const BIO_METHOD *bio_f_async_filter(void)
 {
     if (methods_async == NULL) {
         methods_async = BIO_meth_new(BIO_TYPE_ASYNC_FILTER, "Async filter");
diff --git a/test/asynctest.c b/test/asynctest.c
index eef3c32..c2740e6 100644
--- a/test/asynctest.c
+++ b/test/asynctest.c
@@ -87,7 +87,7 @@
     return 1;
 }
 
-static int test_ASYNC_init_thread()
+static int test_ASYNC_init_thread(void)
 {
     ASYNC_JOB *job1 = NULL, *job2 = NULL, *job3 = NULL;
     int funcret1, funcret2, funcret3;
@@ -123,7 +123,7 @@
     return 1;
 }
 
-static int test_ASYNC_start_job()
+static int test_ASYNC_start_job(void)
 {
     ASYNC_JOB *job = NULL;
     int funcret;
@@ -151,7 +151,7 @@
     return 1;
 }
 
-static int test_ASYNC_get_current_job()
+static int test_ASYNC_get_current_job(void)
 {
     ASYNC_JOB *job = NULL;
     int funcret;
@@ -178,7 +178,7 @@
     return 1;
 }
 
-static int test_ASYNC_WAIT_CTX_get_all_fds()
+static int test_ASYNC_WAIT_CTX_get_all_fds(void)
 {
     ASYNC_JOB *job = NULL;
     int funcret;
@@ -245,7 +245,7 @@
     return 1;
 }
 
-static int test_ASYNC_block_pause()
+static int test_ASYNC_block_pause(void)
 {
     ASYNC_JOB *job = NULL;
     int funcret;
diff --git a/test/cipherlist_test.c b/test/cipherlist_test.c
index b224983..5023c1c 100644
--- a/test/cipherlist_test.c
+++ b/test/cipherlist_test.c
@@ -215,7 +215,7 @@
     return result;
 }
 
-int setup_tests()
+int setup_tests(void)
 {
     ADD_TEST(test_default_cipherlist_implicit);
     ADD_TEST(test_default_cipherlist_explicit);
diff --git a/test/drbgtest.c b/test/drbgtest.c
index d69456b..c1887d6 100644
--- a/test/drbgtest.c
+++ b/test/drbgtest.c
@@ -554,7 +554,7 @@
 }
 
 /* Resets all drbg hook contexts */
-static void reset_drbg_hook_ctx()
+static void reset_drbg_hook_ctx(void)
 {
     reset_hook_ctx(&master_ctx);
     reset_hook_ctx(&public_ctx);
diff --git a/test/dtls_mtu_test.c b/test/dtls_mtu_test.c
index dff65a7..8e385b0 100644
--- a/test/dtls_mtu_test.c
+++ b/test/dtls_mtu_test.c
@@ -189,7 +189,7 @@
     return ret;
 }
 
-int setup_tests()
+int setup_tests(void)
 {
     ADD_TEST(run_mtu_tests);
     return 1;
diff --git a/test/dtlsv1listentest.c b/test/dtlsv1listentest.c
index 807bb6d..5331c3b 100644
--- a/test/dtlsv1listentest.c
+++ b/test/dtlsv1listentest.c
@@ -348,7 +348,7 @@
 }
 #endif
 
-int setup_tests()
+int setup_tests(void)
 {
 #ifndef OPENSSL_NO_SOCK
     ADD_ALL_TESTS(dtls_listen_test, (int)OSSL_NELEM(testpackets));
diff --git a/test/evp_test.c b/test/evp_test.c
index b36f25e..e2274d9 100644
--- a/test/evp_test.c
+++ b/test/evp_test.c
@@ -2378,7 +2378,7 @@
 /*
  * Is the key type an unsupported algorithm?
  */
-static int key_unsupported()
+static int key_unsupported(void)
 {
     long err = ERR_peek_error();
 
diff --git a/test/exdatatest.c b/test/exdatatest.c
index 0ded7db..6e90752 100644
--- a/test/exdatatest.c
+++ b/test/exdatatest.c
@@ -127,7 +127,7 @@
     int st;
 } MYOBJ;
 
-static MYOBJ *MYOBJ_new()
+static MYOBJ *MYOBJ_new(void)
 {
     static int count = 0;
     MYOBJ *obj = OPENSSL_malloc(sizeof(*obj));
diff --git a/test/generate_buildtest.pl b/test/generate_buildtest.pl
index 0a9d879..7d55362 100644
--- a/test/generate_buildtest.pl
+++ b/test/generate_buildtest.pl
@@ -27,7 +27,7 @@
 # include <openssl/$name.h>
 #endif
 
-int main()
+int main(void)
 {
     return 0;
 }
diff --git a/test/handshake_helper.c b/test/handshake_helper.c
index 9b781b0..fc5fcd6 100644
--- a/test/handshake_helper.c
+++ b/test/handshake_helper.c
@@ -22,7 +22,7 @@
 #include "handshake_helper.h"
 #include "testutil.h"
 
-HANDSHAKE_RESULT *HANDSHAKE_RESULT_new()
+HANDSHAKE_RESULT *HANDSHAKE_RESULT_new(void)
 {
     HANDSHAKE_RESULT *ret;
 
diff --git a/test/mdc2_internal_test.c b/test/mdc2_internal_test.c
index 64aa2dc..a5c4ebc 100644
--- a/test/mdc2_internal_test.c
+++ b/test/mdc2_internal_test.c
@@ -64,7 +64,7 @@
     return 1;
 }
 
-int setup_tests()
+int setup_tests(void)
 {
     ADD_ALL_TESTS(test_mdc2, OSSL_NELEM(tests));
     return 1;
diff --git a/test/modes_internal_test.c b/test/modes_internal_test.c
index 18c0977..e0f1adf 100644
--- a/test/modes_internal_test.c
+++ b/test/modes_internal_test.c
@@ -99,7 +99,7 @@
     CTS128_TEST_VECTOR(64),
 };
 
-static AES_KEY *cts128_encrypt_key_schedule()
+static AES_KEY *cts128_encrypt_key_schedule(void)
 {
     static int init_key = 1;
     static AES_KEY ks;
@@ -111,7 +111,7 @@
     return &ks;
 }
 
-static AES_KEY *cts128_decrypt_key_schedule()
+static AES_KEY *cts128_decrypt_key_schedule(void)
 {
     static int init_key = 1;
     static AES_KEY ks;
diff --git a/test/pkey_meth_kdf_test.c b/test/pkey_meth_kdf_test.c
index 5d4c468..98495b6 100644
--- a/test/pkey_meth_kdf_test.c
+++ b/test/pkey_meth_kdf_test.c
@@ -170,7 +170,7 @@
 }
 #endif
 
-int setup_tests()
+int setup_tests(void)
 {
     ADD_TEST(test_kdf_tls1_prf);
     ADD_TEST(test_kdf_hkdf);
diff --git a/test/pkey_meth_test.c b/test/pkey_meth_test.c
index 004bb30..0277013 100644
--- a/test/pkey_meth_test.c
+++ b/test/pkey_meth_test.c
@@ -75,7 +75,7 @@
     return good;
 }
 
-int setup_tests()
+int setup_tests(void)
 {
     ADD_TEST(test_asn1_meths);
     ADD_TEST(test_pkey_meths);
diff --git a/test/rdrand_sanitytest.c b/test/rdrand_sanitytest.c
index 1844d72..0e67b37 100644
--- a/test/rdrand_sanitytest.c
+++ b/test/rdrand_sanitytest.c
@@ -20,7 +20,7 @@
 size_t OPENSSL_ia32_rdrand_bytes(unsigned char *buf, size_t len);
 size_t OPENSSL_ia32_rdseed_bytes(unsigned char *buf, size_t len);
 
-void OPENSSL_cpuid_setup();
+void OPENSSL_cpuid_setup(void);
 
 extern unsigned int OPENSSL_ia32cap_P[4];
 
@@ -81,12 +81,12 @@
     return testresult;
 }
 
-static int sanity_check_rdrand_bytes()
+static int sanity_check_rdrand_bytes(void)
 {
     return sanity_check_bytes(OPENSSL_ia32_rdrand_bytes, 1000, 0, 10, 10);
 }
 
-static int sanity_check_rdseed_bytes()
+static int sanity_check_rdseed_bytes(void)
 {
     /*-
      * RDSEED may take many retries to succeed; note that this is effectively
@@ -97,7 +97,8 @@
     return sanity_check_bytes(OPENSSL_ia32_rdseed_bytes, 1000, 1, 10000, 10);
 }
 
-int setup_tests() {
+int setup_tests(void)
+{
     OPENSSL_cpuid_setup();
 
     int have_rdseed = (OPENSSL_ia32cap_P[2] & (1 << 18)) != 0;
@@ -117,7 +118,7 @@
 
 #else
 
-int setup_tests()
+int setup_tests(void)
 {
     return 1;
 }
diff --git a/test/ssl_cert_table_internal_test.c b/test/ssl_cert_table_internal_test.c
index 32ec4c8..2104e8c 100644
--- a/test/ssl_cert_table_internal_test.c
+++ b/test/ssl_cert_table_internal_test.c
@@ -76,7 +76,7 @@
     return 1;
 }
 
-int setup_tests()
+int setup_tests(void)
 {
     ADD_TEST(test_ssl_cert_table);
     return 1;
diff --git a/test/ssl_test_ctx.c b/test/ssl_test_ctx.c
index 7676966..5b427e5 100644
--- a/test/ssl_test_ctx.c
+++ b/test/ssl_test_ctx.c
@@ -709,7 +709,7 @@
     { "SessionTicketAppData", &parse_server_session_ticket_app_data },
 };
 
-SSL_TEST_CTX *SSL_TEST_CTX_new()
+SSL_TEST_CTX *SSL_TEST_CTX_new(void)
 {
     SSL_TEST_CTX *ret;
 
diff --git a/test/sslcorrupttest.c b/test/sslcorrupttest.c
index 30d3d3d..d06c8c7 100644
--- a/test/sslcorrupttest.c
+++ b/test/sslcorrupttest.c
@@ -137,7 +137,7 @@
  */
 static const char **cipher_list = NULL;
 
-static int setup_cipher_list()
+static int setup_cipher_list(void)
 {
     SSL_CTX *ctx = NULL;
     SSL *ssl = NULL;
diff --git a/test/ssltest_old.c b/test/ssltest_old.c
index 34705c3..e974f6c 100644
--- a/test/ssltest_old.c
+++ b/test/ssltest_old.c
@@ -423,7 +423,7 @@
     return 1;
 }
 
-static int verify_serverinfo()
+static int verify_serverinfo(void)
 {
     if (serverinfo_sct != serverinfo_sct_seen)
         return -1;
@@ -2836,7 +2836,7 @@
  *    $ openssl dhparam -C -noout -dsaparam 1024
  * (The third function has been renamed to avoid name conflicts.)
  */
-static DH *get_dh512()
+static DH *get_dh512(void)
 {
     static unsigned char dh512_p[] = {
         0xCB, 0xC8, 0xE1, 0x86, 0xD0, 0x1F, 0x94, 0x17, 0xA6, 0x99, 0xF0,
@@ -2870,7 +2870,7 @@
     return dh;
 }
 
-static DH *get_dh1024()
+static DH *get_dh1024(void)
 {
     static unsigned char dh1024_p[] = {
         0xF8, 0x81, 0x89, 0x7D, 0x14, 0x24, 0xC5, 0xD1, 0xE6, 0xF7, 0xBF,
@@ -2914,7 +2914,7 @@
     return dh;
 }
 
-static DH *get_dh1024dsa()
+static DH *get_dh1024dsa(void)
 {
     static unsigned char dh1024_p[] = {
         0xC8, 0x00, 0xF7, 0x08, 0x07, 0x89, 0x4D, 0x90, 0x53, 0xF3, 0xD5,
diff --git a/test/time_offset_test.c b/test/time_offset_test.c
index f3b20dd..8776559 100644
--- a/test/time_offset_test.c
+++ b/test/time_offset_test.c
@@ -106,7 +106,7 @@
     return 1;
 }
 
-int setup_tests()
+int setup_tests(void)
 {
     ADD_ALL_TESTS(test_offset, OSSL_NELEM(tests));
     return 1;
diff --git a/test/tls13ccstest.c b/test/tls13ccstest.c
index 25dc819..92e9d59 100644
--- a/test/tls13ccstest.c
+++ b/test/tls13ccstest.c
@@ -37,7 +37,7 @@
 
 static BIO_METHOD *method_watchccs = NULL;
 
-static const BIO_METHOD *bio_f_watchccs_filter()
+static const BIO_METHOD *bio_f_watchccs_filter(void)
 {
     if (method_watchccs == NULL) {
         method_watchccs = BIO_meth_new(BIO_TYPE_WATCHCCS_FILTER,
diff --git a/test/tls13secretstest.c b/test/tls13secretstest.c
index 8b775b8..313ab56 100644
--- a/test/tls13secretstest.c
+++ b/test/tls13secretstest.c
@@ -399,7 +399,7 @@
     return ret;
 }
 
-int setup_tests()
+int setup_tests(void)
 {
     ADD_TEST(test_handshake_secrets);
     return 1;
diff --git a/test/v3nametest.c b/test/v3nametest.c
index 08684ea..86f3829 100644
--- a/test/v3nametest.c
+++ b/test/v3nametest.c
@@ -251,7 +251,7 @@
     {set_altname_email, "set rfc822Name", 0, 1},
 };
 
-static X509 *make_cert()
+static X509 *make_cert(void)
 {
     X509 *crt = NULL;
 
diff --git a/test/x509_internal_test.c b/test/x509_internal_test.c
index 03bbcf2..9f351a4 100644
--- a/test/x509_internal_test.c
+++ b/test/x509_internal_test.c
@@ -57,7 +57,7 @@
     return good;
 }
 
-int setup_tests()
+int setup_tests(void)
 {
     ADD_TEST(test_standard_exts);
     return 1;
diff --git a/test/x509_time_test.c b/test/x509_time_test.c
index 5983bdf..d672a9a 100644
--- a/test/x509_time_test.c
+++ b/test/x509_time_test.c
@@ -482,7 +482,7 @@
     return ret;
 }
 
-int setup_tests()
+int setup_tests(void)
 {
     ADD_TEST(test_x509_cmp_time_current);
     ADD_ALL_TESTS(test_x509_cmp_time, OSSL_NELEM(x509_cmp_tests));