summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-30 05:25:32 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-30 05:25:32 +0000
commit28b9f11d5a4b878adb50a3e5472ceea8c462ed4a (patch)
tree0089b9a1bce84d5ec72badeae44b4e08f08a9c33
parentcf5450bb7c86c4eb83f0d468c73d987e4a3e7344 (diff)
downloadruby-28b9f11d5a4b878adb50a3e5472ceea8c462ed4a.tar.gz
protoize no-arguments functions
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--dir.c2
-rw-r--r--eval.c2
-rw-r--r--ext/digest/md5/md5.c4
-rw-r--r--ext/digest/md5/md5init.c2
-rw-r--r--ext/digest/rmd160/rmd160init.c2
-rw-r--r--ext/digest/sha1/sha1init.c2
-rw-r--r--ext/digest/sha2/sha2init.c2
-rwxr-xr-x[-rw-r--r--]ext/dl/callback/mkcallback.rb11
-rw-r--r--ext/fcntl/fcntl.c2
-rw-r--r--ext/fiddle/closure.c2
-rw-r--r--ext/io/wait/wait.c2
-rw-r--r--ext/nkf/nkf-utf8/nkf.c8
-rw-r--r--ext/nkf/nkf.c2
-rw-r--r--ext/openssl/ossl.c4
-rw-r--r--ext/openssl/ossl_asn1.c2
-rw-r--r--ext/openssl/ossl_bn.c2
-rw-r--r--ext/openssl/ossl_config.c2
-rw-r--r--ext/openssl/ossl_digest.c2
-rw-r--r--ext/openssl/ossl_engine.c4
-rw-r--r--ext/openssl/ossl_hmac.c4
-rw-r--r--ext/openssl/ossl_ns_spki.c2
-rw-r--r--ext/openssl/ossl_ocsp.c4
-rw-r--r--ext/openssl/ossl_pkcs12.c2
-rw-r--r--ext/openssl/ossl_pkcs5.c2
-rw-r--r--ext/openssl/ossl_pkcs7.c2
-rw-r--r--ext/openssl/ossl_pkey.c2
-rw-r--r--ext/openssl/ossl_pkey_dh.c4
-rw-r--r--ext/openssl/ossl_pkey_dsa.c4
-rw-r--r--ext/openssl/ossl_pkey_rsa.c4
-rw-r--r--ext/openssl/ossl_rand.c2
-rw-r--r--ext/openssl/ossl_ssl.c2
-rw-r--r--ext/openssl/ossl_x509.c2
-rw-r--r--ext/openssl/ossl_x509attr.c2
-rw-r--r--ext/openssl/ossl_x509cert.c2
-rw-r--r--ext/openssl/ossl_x509crl.c2
-rw-r--r--ext/openssl/ossl_x509ext.c2
-rw-r--r--ext/openssl/ossl_x509name.c2
-rw-r--r--ext/openssl/ossl_x509req.c2
-rw-r--r--ext/openssl/ossl_x509revoked.c2
-rw-r--r--ext/openssl/ossl_x509store.c2
-rw-r--r--ext/pathname/pathname.c2
-rw-r--r--ext/pty/pty.c2
-rw-r--r--ext/readline/readline.c2
-rw-r--r--ext/sdbm/init.c4
-rw-r--r--ext/socket/init.c2
-rw-r--r--ext/socket/raddrinfo.c2
-rw-r--r--ext/socket/socket.c2
-rw-r--r--ext/stringio/stringio.c2
-rw-r--r--ext/strscan/strscan.c2
-rw-r--r--ext/tk/stubs.c22
-rw-r--r--ext/tk/tcltklib.c22
-rw-r--r--ext/tk/tkutil/tkutil.c4
-rw-r--r--ext/win32ole/win32ole.c2
-rw-r--r--ext/win32ole/win32ole_event.c2
-rw-r--r--ext/win32ole/win32ole_param.c2
-rw-r--r--ext/win32ole/win32ole_record.c2
-rw-r--r--ext/win32ole/win32ole_typelib.c2
-rw-r--r--ext/win32ole/win32ole_variant.c2
-rw-r--r--ext/zlib/zlib.c2
-rw-r--r--hash.c2
-rw-r--r--load.c2
-rw-r--r--nacl/pepper_main.c2
-rw-r--r--process.c4
63 files changed, 104 insertions, 99 deletions
diff --git a/dir.c b/dir.c
index 09b78c6b4b..51312717fe 100644
--- a/dir.c
+++ b/dir.c
@@ -2248,7 +2248,7 @@ dir_s_home(int argc, VALUE *argv, VALUE obj)
*
*/
VALUE
-rb_file_directory_p()
+rb_file_directory_p(void)
{
}
#endif
diff --git a/eval.c b/eval.c
index 1dabe2e24b..3e4ea1697e 100644
--- a/eval.c
+++ b/eval.c
@@ -1132,7 +1132,7 @@ rb_mod_prepend(int argc, VALUE *argv, VALUE module)
}
static VALUE
-hidden_identity_hash_new()
+hidden_identity_hash_new(void)
{
VALUE hash = rb_hash_new();
diff --git a/ext/digest/md5/md5.c b/ext/digest/md5/md5.c
index 4ff280bb0a..19fe54a693 100644
--- a/ext/digest/md5/md5.c
+++ b/ext/digest/md5/md5.c
@@ -61,7 +61,7 @@
*/
#include <string.h>
int
-main()
+main(void)
{
static const char *const test[7*2] = {
"", "d41d8cd98f00b204e9800998ecf8427e",
@@ -102,7 +102,7 @@ main()
#ifdef COMPUTE_T_VALUES
#include <math.h>
int
-main()
+main(void)
{
int i;
for (i = 1; i <= 64; ++i) {
diff --git a/ext/digest/md5/md5init.c b/ext/digest/md5/md5init.c
index 9ab2855620..6363fe6b70 100644
--- a/ext/digest/md5/md5init.c
+++ b/ext/digest/md5/md5init.c
@@ -24,7 +24,7 @@ static const rb_digest_metadata_t md5 = {
* RFC1321.
*/
void
-Init_md5()
+Init_md5(void)
{
VALUE mDigest, cDigest_Base, cDigest_MD5;
diff --git a/ext/digest/rmd160/rmd160init.c b/ext/digest/rmd160/rmd160init.c
index d88a3d3e69..8cf5461cbf 100644
--- a/ext/digest/rmd160/rmd160init.c
+++ b/ext/digest/rmd160/rmd160init.c
@@ -24,7 +24,7 @@ static const rb_digest_metadata_t rmd160 = {
* Bosselaers, and Bart Preneel.
*/
void
-Init_rmd160()
+Init_rmd160(void)
{
VALUE mDigest, cDigest_Base, cDigest_RMD160;
diff --git a/ext/digest/sha1/sha1init.c b/ext/digest/sha1/sha1init.c
index d3dbab4b50..22a67da171 100644
--- a/ext/digest/sha1/sha1init.c
+++ b/ext/digest/sha1/sha1init.c
@@ -24,7 +24,7 @@ static const rb_digest_metadata_t sha1 = {
* Technology), described in FIPS PUB 180-1.
*/
void
-Init_sha1()
+Init_sha1(void)
{
VALUE mDigest, cDigest_Base, cDigest_SHA1;
diff --git a/ext/digest/sha2/sha2init.c b/ext/digest/sha2/sha2init.c
index d627beba6e..2b0585543a 100644
--- a/ext/digest/sha2/sha2init.c
+++ b/ext/digest/sha2/sha2init.c
@@ -29,7 +29,7 @@ FOREACH_BITLEN(DEFINE_ALGO_METADATA)
* Standards and Technology), described in FIPS PUB 180-2.
*/
void
-Init_sha2()
+Init_sha2(void)
{
VALUE mDigest, cDigest_Base;
ID id_metadata;
diff --git a/ext/dl/callback/mkcallback.rb b/ext/dl/callback/mkcallback.rb
index e94a196247..15802f5e05 100644..100755
--- a/ext/dl/callback/mkcallback.rb
+++ b/ext/dl/callback/mkcallback.rb
@@ -123,10 +123,15 @@ end
def gencallback(ty, calltype, proc_entry, argc, n)
dltype = DLTYPE[ty]
ret = dltype[:conv]
+ if argc == 0
+ args = "void"
+ else
+ args = (0...argc).collect{|i| "DLSTACK_TYPE stack#{i}"}.join(", ")
+ end
src = <<-EOS
#{calltype == STDCALL ? "\n#ifdef FUNC_STDCALL" : ""}
static #{dltype[:type]}
-FUNC_#{calltype.upcase}(#{func_name(ty,argc,n,calltype)})(#{(0...argc).collect{|i| "DLSTACK_TYPE stack#{i}"}.join(", ")})
+FUNC_#{calltype.upcase}(#{func_name(ty,argc,n,calltype)})(#{args})
{
VALUE #{ret ? "ret, " : ""}cb#{argc > 0 ? ", args[#{argc}]" : ""};
#{
@@ -177,7 +182,7 @@ extern ID rb_dl_cb_call;
yield body
body << <<-EOS
void
-#{initname}()
+#{initname}(void)
{
#{gen_push_proc_ary(ty, "rb_DLCdeclCallbackProcs")}
#{gen_push_addr_ary(ty, "rb_DLCdeclCallbackAddrs", CDECL)}
@@ -201,7 +206,7 @@ for ty in 0...MAX_DLTYPE
end
end
}
- $out << "void #{initname}();\n"
+ $out << "void #{initname}(void);\n"
callbacks << [filename, body]
end
diff --git a/ext/fcntl/fcntl.c b/ext/fcntl/fcntl.c
index 3538d94948..62780b78c0 100644
--- a/ext/fcntl/fcntl.c
+++ b/ext/fcntl/fcntl.c
@@ -62,7 +62,7 @@ pack up your own arguments to pass as args for locking functions, etc.
*
*/
void
-Init_fcntl()
+Init_fcntl(void)
{
VALUE mFcntl = rb_define_module("Fcntl");
#ifdef F_DUPFD
diff --git a/ext/fiddle/closure.c b/ext/fiddle/closure.c
index e0f7e4b12d..d857bfe870 100644
--- a/ext/fiddle/closure.c
+++ b/ext/fiddle/closure.c
@@ -260,7 +260,7 @@ to_i(VALUE self)
}
void
-Init_fiddle_closure()
+Init_fiddle_closure(void)
{
#if 0
mFiddle = rb_define_module("Fiddle"); /* let rdoc know about mFiddle */
diff --git a/ext/io/wait/wait.c b/ext/io/wait/wait.c
index d8bb55fc47..7e17cb2e89 100644
--- a/ext/io/wait/wait.c
+++ b/ext/io/wait/wait.c
@@ -177,7 +177,7 @@ io_wait_writable(int argc, VALUE *argv, VALUE io)
*/
void
-Init_wait()
+Init_wait(void)
{
rb_define_method(rb_cIO, "nread", io_nread, 0);
rb_define_method(rb_cIO, "ready?", io_ready_p, 0);
diff --git a/ext/nkf/nkf-utf8/nkf.c b/ext/nkf/nkf-utf8/nkf.c
index 65d2c190ec..fcf95c41a5 100644
--- a/ext/nkf/nkf-utf8/nkf.c
+++ b/ext/nkf/nkf-utf8/nkf.c
@@ -774,7 +774,7 @@ nkf_enc_find(const char *name)
#ifdef DEFAULT_CODE_LOCALE
static const char*
-nkf_locale_charmap()
+nkf_locale_charmap(void)
{
#ifdef HAVE_LANGINFO_H
return nl_langinfo(CODESET);
@@ -802,7 +802,7 @@ nkf_locale_charmap()
}
static nkf_encoding*
-nkf_locale_encoding()
+nkf_locale_encoding(void)
{
nkf_encoding *enc = 0;
const char *encname = nkf_locale_charmap();
@@ -813,13 +813,13 @@ nkf_locale_encoding()
#endif /* DEFAULT_CODE_LOCALE */
static nkf_encoding*
-nkf_utf8_encoding()
+nkf_utf8_encoding(void)
{
return &nkf_encoding_table[UTF_8];
}
static nkf_encoding*
-nkf_default_encoding()
+nkf_default_encoding(void)
{
nkf_encoding *enc = 0;
#ifdef DEFAULT_CODE_LOCALE
diff --git a/ext/nkf/nkf.c b/ext/nkf/nkf.c
index 2f36866ac4..9613a925ce 100644
--- a/ext/nkf/nkf.c
+++ b/ext/nkf/nkf.c
@@ -478,7 +478,7 @@ rb_nkf_guess(VALUE obj, VALUE src)
*/
void
-Init_nkf()
+Init_nkf(void)
{
VALUE mNKF = rb_define_module("NKF");
diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c
index 8b25c02990..5fbfb3358a 100644
--- a/ext/openssl/ossl.c
+++ b/ext/openssl/ossl.c
@@ -361,7 +361,7 @@ ossl_exc_new(VALUE exc, const char *fmt, ...)
* Any errors you see here are probably due to a bug in ruby's OpenSSL implementation.
*/
VALUE
-ossl_get_errors()
+ossl_get_errors(void)
{
VALUE ary;
long e;
@@ -1034,7 +1034,7 @@ static void Init_ossl_locks(void)
*
*/
void
-Init_openssl()
+Init_openssl(void)
{
/*
* Init timezone info
diff --git a/ext/openssl/ossl_asn1.c b/ext/openssl/ossl_asn1.c
index 65ae71e861..3a24d17db1 100644
--- a/ext/openssl/ossl_asn1.c
+++ b/ext/openssl/ossl_asn1.c
@@ -1472,7 +1472,7 @@ OSSL_ASN1_IMPL_FACTORY_METHOD(Set)
OSSL_ASN1_IMPL_FACTORY_METHOD(EndOfContent)
void
-Init_ossl_asn1()
+Init_ossl_asn1(void)
{
VALUE ary;
int i;
diff --git a/ext/openssl/ossl_bn.c b/ext/openssl/ossl_bn.c
index bdaf077b5f..2528f1c089 100644
--- a/ext/openssl/ossl_bn.c
+++ b/ext/openssl/ossl_bn.c
@@ -773,7 +773,7 @@ ossl_bn_is_prime_fasttest(int argc, VALUE *argv, VALUE self)
* (NOTE: ordering of methods is the same as in 'man bn')
*/
void
-Init_ossl_bn()
+Init_ossl_bn(void)
{
#if 0
mOSSL = rb_define_module("OpenSSL"); /* let rdoc know about mOSSL */
diff --git a/ext/openssl/ossl_config.c b/ext/openssl/ossl_config.c
index 140f5c3ad0..74a52f71a2 100644
--- a/ext/openssl/ossl_config.c
+++ b/ext/openssl/ossl_config.c
@@ -69,7 +69,7 @@ GetConfigPtr(VALUE obj)
* INIT
*/
void
-Init_ossl_config()
+Init_ossl_config(void)
{
char *default_config_file;
eConfigError = rb_define_class_under(mOSSL, "ConfigError", eOSSLError);
diff --git a/ext/openssl/ossl_digest.c b/ext/openssl/ossl_digest.c
index 7e5e7ff1ab..bf618c8323 100644
--- a/ext/openssl/ossl_digest.c
+++ b/ext/openssl/ossl_digest.c
@@ -294,7 +294,7 @@ ossl_digest_block_length(VALUE self)
* INIT
*/
void
-Init_ossl_digest()
+Init_ossl_digest(void)
{
rb_require("digest");
diff --git a/ext/openssl/ossl_engine.c b/ext/openssl/ossl_engine.c
index f99a30dfc3..96bce5e283 100644
--- a/ext/openssl/ossl_engine.c
+++ b/ext/openssl/ossl_engine.c
@@ -533,7 +533,7 @@ ossl_engine_inspect(VALUE self)
#define DefEngineConst(x) rb_define_const(cEngine, #x, INT2NUM(ENGINE_##x))
void
-Init_ossl_engine()
+Init_ossl_engine(void)
{
cEngine = rb_define_class_under(mOSSL, "Engine", rb_cObject);
eEngineError = rb_define_class_under(cEngine, "EngineError", eOSSLError);
@@ -578,7 +578,7 @@ Init_ossl_engine()
}
#else
void
-Init_ossl_engine()
+Init_ossl_engine(void)
{
}
#endif
diff --git a/ext/openssl/ossl_hmac.c b/ext/openssl/ossl_hmac.c
index b1e853dde3..516e3ed8cf 100644
--- a/ext/openssl/ossl_hmac.c
+++ b/ext/openssl/ossl_hmac.c
@@ -327,7 +327,7 @@ ossl_hmac_s_hexdigest(VALUE klass, VALUE digest, VALUE key, VALUE data)
* INIT
*/
void
-Init_ossl_hmac()
+Init_ossl_hmac(void)
{
#if 0
/* :nodoc: */
@@ -357,7 +357,7 @@ Init_ossl_hmac()
#else /* NO_HMAC */
# warning >>> OpenSSL is compiled without HMAC support <<<
void
-Init_ossl_hmac()
+Init_ossl_hmac(void)
{
rb_warning("HMAC is not available: OpenSSL is compiled without HMAC.");
}
diff --git a/ext/openssl/ossl_ns_spki.c b/ext/openssl/ossl_ns_spki.c
index b80984cfee..965bbe87d2 100644
--- a/ext/openssl/ossl_ns_spki.c
+++ b/ext/openssl/ossl_ns_spki.c
@@ -360,7 +360,7 @@ ossl_spki_verify(VALUE self, VALUE key)
*/
void
-Init_ossl_ns_spki()
+Init_ossl_ns_spki(void)
{
#if 0
mOSSL = rb_define_module("OpenSSL"); /* let rdoc know about mOSSL */
diff --git a/ext/openssl/ossl_ocsp.c b/ext/openssl/ossl_ocsp.c
index c959379324..9848ba27b7 100644
--- a/ext/openssl/ossl_ocsp.c
+++ b/ext/openssl/ossl_ocsp.c
@@ -900,7 +900,7 @@ ossl_ocspcid_get_serial(VALUE self)
}
void
-Init_ossl_ocsp()
+Init_ossl_ocsp(void)
{
/*
* OpenSSL::OCSP implements Online Certificate Status Protocol requests
@@ -1182,7 +1182,7 @@ Init_ossl_ocsp()
#else /* ! OSSL_OCSP_ENABLED */
void
-Init_ossl_ocsp()
+Init_ossl_ocsp(void)
{
}
#endif
diff --git a/ext/openssl/ossl_pkcs12.c b/ext/openssl/ossl_pkcs12.c
index 8a5f816082..b3974cb78c 100644
--- a/ext/openssl/ossl_pkcs12.c
+++ b/ext/openssl/ossl_pkcs12.c
@@ -192,7 +192,7 @@ ossl_pkcs12_to_der(VALUE self)
}
void
-Init_ossl_pkcs12()
+Init_ossl_pkcs12(void)
{
/*
* Defines a file format commonly used to store private keys with
diff --git a/ext/openssl/ossl_pkcs5.c b/ext/openssl/ossl_pkcs5.c
index 3b615e4828..6c7738a2b2 100644
--- a/ext/openssl/ossl_pkcs5.c
+++ b/ext/openssl/ossl_pkcs5.c
@@ -87,7 +87,7 @@ ossl_pkcs5_pbkdf2_hmac_sha1(VALUE self, VALUE pass, VALUE salt, VALUE iter, VALU
#endif
void
-Init_ossl_pkcs5()
+Init_ossl_pkcs5(void)
{
/*
* Password-based Encryption
diff --git a/ext/openssl/ossl_pkcs7.c b/ext/openssl/ossl_pkcs7.c
index bd5dc78947..f476807fb7 100644
--- a/ext/openssl/ossl_pkcs7.c
+++ b/ext/openssl/ossl_pkcs7.c
@@ -980,7 +980,7 @@ ossl_pkcs7ri_get_enc_key(VALUE self)
* INIT
*/
void
-Init_ossl_pkcs7()
+Init_ossl_pkcs7(void)
{
cPKCS7 = rb_define_class_under(mOSSL, "PKCS7", rb_cObject);
ePKCS7Error = rb_define_class_under(cPKCS7, "PKCS7Error", eOSSLError);
diff --git a/ext/openssl/ossl_pkey.c b/ext/openssl/ossl_pkey.c
index 878b221270..43942274a2 100644
--- a/ext/openssl/ossl_pkey.c
+++ b/ext/openssl/ossl_pkey.c
@@ -342,7 +342,7 @@ ossl_pkey_verify(VALUE self, VALUE digest, VALUE sig, VALUE data)
* INIT
*/
void
-Init_ossl_pkey()
+Init_ossl_pkey(void)
{
#if 0
mOSSL = rb_define_module("OpenSSL"); /* let rdoc know about mOSSL */
diff --git a/ext/openssl/ossl_pkey_dh.c b/ext/openssl/ossl_pkey_dh.c
index 011b6f00b4..cf283263a6 100644
--- a/ext/openssl/ossl_pkey_dh.c
+++ b/ext/openssl/ossl_pkey_dh.c
@@ -588,7 +588,7 @@ ossl_create_dh(unsigned char *p, size_t plen, unsigned char *g, size_t glen)
* INIT
*/
void
-Init_ossl_dh()
+Init_ossl_dh(void)
{
#if 0
mOSSL = rb_define_module("OpenSSL"); /* let rdoc know about mOSSL and mPKey */
@@ -660,7 +660,7 @@ Init_ossl_dh()
#else /* defined NO_DH */
void
-Init_ossl_dh()
+Init_ossl_dh(void)
{
}
#endif /* NO_DH */
diff --git a/ext/openssl/ossl_pkey_dsa.c b/ext/openssl/ossl_pkey_dsa.c
index 823b9b66e5..979ae154e9 100644
--- a/ext/openssl/ossl_pkey_dsa.c
+++ b/ext/openssl/ossl_pkey_dsa.c
@@ -563,7 +563,7 @@ OSSL_PKEY_BN(dsa, priv_key)
* INIT
*/
void
-Init_ossl_dsa()
+Init_ossl_dsa(void)
{
#if 0
mOSSL = rb_define_module("OpenSSL"); /* let rdoc know about mOSSL and mPKey */
@@ -617,7 +617,7 @@ Init_ossl_dsa()
#else /* defined NO_DSA */
void
-Init_ossl_dsa()
+Init_ossl_dsa(void)
{
}
#endif /* NO_DSA */
diff --git a/ext/openssl/ossl_pkey_rsa.c b/ext/openssl/ossl_pkey_rsa.c
index 4c346a042f..0fef10a042 100644
--- a/ext/openssl/ossl_pkey_rsa.c
+++ b/ext/openssl/ossl_pkey_rsa.c
@@ -626,7 +626,7 @@ OSSL_PKEY_BN(rsa, iqmp)
#define DefRSAConst(x) rb_define_const(cRSA, #x,INT2FIX(RSA_##x))
void
-Init_ossl_rsa()
+Init_ossl_rsa(void)
{
#if 0
mOSSL = rb_define_module("OpenSSL"); /* let rdoc know about mOSSL and mPKey */
@@ -694,7 +694,7 @@ Init_ossl_rsa()
#else /* defined NO_RSA */
void
-Init_ossl_rsa()
+Init_ossl_rsa(void)
{
}
#endif /* NO_RSA */
diff --git a/ext/openssl/ossl_rand.c b/ext/openssl/ossl_rand.c
index 270a4b7437..d77eb799cd 100644
--- a/ext/openssl/ossl_rand.c
+++ b/ext/openssl/ossl_rand.c
@@ -179,7 +179,7 @@ ossl_rand_status(VALUE self)
* INIT
*/
void
-Init_ossl_rand()
+Init_ossl_rand(void)
{
#if 0
mOSSL = rb_define_module("OpenSSL"); /* let rdoc know about mOSSL */
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
index d37e51c857..ccfd72dd6a 100644
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -1858,7 +1858,7 @@ ossl_ssl_npn_protocol(VALUE self)
#endif /* !defined(OPENSSL_NO_SOCK) */
void
-Init_ossl_ssl()
+Init_ossl_ssl(void)
{
int i;
VALUE ary;
diff --git a/ext/openssl/ossl_x509.c b/ext/openssl/ossl_x509.c
index fd1d9b6c7e..4de45455d4 100644
--- a/ext/openssl/ossl_x509.c
+++ b/ext/openssl/ossl_x509.c
@@ -17,7 +17,7 @@ VALUE mX509;
rb_define_const(mX509, "DEFAULT_" #x, rb_str_new2(X509_get_default_##i()))
void
-Init_ossl_x509()
+Init_ossl_x509(void)
{
mX509 = rb_define_module_under(mOSSL, "X509");
diff --git a/ext/openssl/ossl_x509attr.c b/ext/openssl/ossl_x509attr.c
index d50f88c969..fdf0481c06 100644
--- a/ext/openssl/ossl_x509attr.c
+++ b/ext/openssl/ossl_x509attr.c
@@ -260,7 +260,7 @@ ossl_x509attr_to_der(VALUE self)
* X509_ATTRIBUTE init
*/
void
-Init_ossl_x509attr()
+Init_ossl_x509attr(void)
{
eX509AttrError = rb_define_class_under(mX509, "AttributeError", eOSSLError);
diff --git a/ext/openssl/ossl_x509cert.c b/ext/openssl/ossl_x509cert.c
index 85bbc0d081..0c8f07517d 100644
--- a/ext/openssl/ossl_x509cert.c
+++ b/ext/openssl/ossl_x509cert.c
@@ -708,7 +708,7 @@ ossl_x509_inspect(VALUE self)
* INIT
*/
void
-Init_ossl_x509cert()
+Init_ossl_x509cert(void)
{
#if 0
diff --git a/ext/openssl/ossl_x509crl.c b/ext/openssl/ossl_x509crl.c
index dec13c8cae..beacc26092 100644
--- a/ext/openssl/ossl_x509crl.c
+++ b/ext/openssl/ossl_x509crl.c
@@ -502,7 +502,7 @@ ossl_x509crl_add_extension(VALUE self, VALUE extension)
* INIT
*/
void
-Init_ossl_x509crl()
+Init_ossl_x509crl(void)
{
eX509CRLError = rb_define_class_under(mX509, "CRLError", eOSSLError);
diff --git a/ext/openssl/ossl_x509ext.c b/ext/openssl/ossl_x509ext.c
index bd2e1dd2fa..48625f859b 100644
--- a/ext/openssl/ossl_x509ext.c
+++ b/ext/openssl/ossl_x509ext.c
@@ -436,7 +436,7 @@ ossl_x509ext_to_der(VALUE obj)
* INIT
*/
void
-Init_ossl_x509ext()
+Init_ossl_x509ext(void)
{
eX509ExtError = rb_define_class_under(mX509, "ExtensionError", eOSSLError);
diff --git a/ext/openssl/ossl_x509name.c b/ext/openssl/ossl_x509name.c
index be70dc1b12..cf541e565c 100644
--- a/ext/openssl/ossl_x509name.c
+++ b/ext/openssl/ossl_x509name.c
@@ -426,7 +426,7 @@ ossl_x509name_to_der(VALUE self)
*/
void
-Init_ossl_x509name()
+Init_ossl_x509name(void)
{
VALUE utf8str, ptrstr, ia5str, hash;
diff --git a/ext/openssl/ossl_x509req.c b/ext/openssl/ossl_x509req.c
index 5927f76d44..a7f5dd2048 100644
--- a/ext/openssl/ossl_x509req.c
+++ b/ext/openssl/ossl_x509req.c
@@ -438,7 +438,7 @@ ossl_x509req_add_attribute(VALUE self, VALUE attr)
* X509_REQUEST init
*/
void
-Init_ossl_x509req()
+Init_ossl_x509req(void)
{
eX509ReqError = rb_define_class_under(mX509, "RequestError", eOSSLError);
diff --git a/ext/openssl/ossl_x509revoked.c b/ext/openssl/ossl_x509revoked.c
index 320abaa7ae..c98a95ea27 100644
--- a/ext/openssl/ossl_x509revoked.c
+++ b/ext/openssl/ossl_x509revoked.c
@@ -209,7 +209,7 @@ ossl_x509revoked_add_extension(VALUE self, VALUE ext)
* INIT
*/
void
-Init_ossl_x509revoked()
+Init_ossl_x509revoked(void)
{
eX509RevError = rb_define_class_under(mX509, "RevokedError", eOSSLError);
diff --git a/ext/openssl/ossl_x509store.c b/ext/openssl/ossl_x509store.c
index f59c376574..dd924bf951 100644
--- a/ext/openssl/ossl_x509store.c
+++ b/ext/openssl/ossl_x509store.c
@@ -593,7 +593,7 @@ ossl_x509stctx_set_time(VALUE self, VALUE time)
* INIT
*/
void
-Init_ossl_x509store()
+Init_ossl_x509store(void)
{
VALUE x509stctx;
diff --git a/ext/pathname/pathname.c b/ext/pathname/pathname.c
index 7c24598759..982ef0fdb7 100644
--- a/ext/pathname/pathname.c
+++ b/ext/pathname/pathname.c
@@ -1370,7 +1370,7 @@ path_f_pathname(VALUE self, VALUE str)
* information. In some cases, a brief description will follow.
*/
void
-Init_pathname()
+Init_pathname(void)
{
id_at_path = rb_intern("@path");
id_to_path = rb_intern("to_path");
diff --git a/ext/pty/pty.c b/ext/pty/pty.c
index ec255cf202..b1950bbb48 100644
--- a/ext/pty/pty.c
+++ b/ext/pty/pty.c
@@ -745,7 +745,7 @@ static VALUE cPTY;
*/
void
-Init_pty()
+Init_pty(void)
{
cPTY = rb_define_module("PTY");
/* :nodoc */
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index 5ceaaf780b..a1963993be 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -1786,7 +1786,7 @@ username_completion_proc_call(VALUE self, VALUE str)
}
void
-Init_readline()
+Init_readline(void)
{
VALUE history, fcomp, ucomp, version;
diff --git a/ext/sdbm/init.c b/ext/sdbm/init.c
index 92901181a5..eb9d3c917d 100644
--- a/ext/sdbm/init.c
+++ b/ext/sdbm/init.c
@@ -72,7 +72,7 @@ struct dbmdata {
};
static void
-closed_sdbm()
+closed_sdbm(void)
{
rb_raise(rb_eDBMError, "closed SDBM file");
}
@@ -991,7 +991,7 @@ fsdbm_reject(VALUE obj)
}
void
-Init_sdbm()
+Init_sdbm(void)
{
rb_cDBM = rb_define_class("SDBM", rb_cObject);
rb_eDBMError = rb_define_class("SDBMError", rb_eStandardError);
diff --git a/ext/socket/init.c b/ext/socket/init.c
index bcc1e52d50..c3f33964a8 100644
--- a/ext/socket/init.c
+++ b/ext/socket/init.c
@@ -594,7 +594,7 @@ rsock_getfamily(int sockfd)
}
void
-rsock_init_socket_init()
+rsock_init_socket_init(void)
{
/*
* SocketError is the error class for socket.
diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c
index 8e6434717a..1d2b9f953e 100644
--- a/ext/socket/raddrinfo.c
+++ b/ext/socket/raddrinfo.c
@@ -716,7 +716,7 @@ get_addrinfo(VALUE self)
static rb_addrinfo_t *
-alloc_addrinfo()
+alloc_addrinfo(void)
{
rb_addrinfo_t *rai = ZALLOC(rb_addrinfo_t);
rai->inspectname = Qnil;
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index f27383d61c..81028c5afb 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -2025,7 +2025,7 @@ socket_s_ip_address_list(VALUE self)
#endif
void
-Init_socket()
+Init_socket(void)
{
rsock_init_basicsocket();
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c
index b426214729..bf39a874a3 100644
--- a/ext/stringio/stringio.c
+++ b/ext/stringio/stringio.c
@@ -1512,7 +1512,7 @@ strio_set_encoding(int argc, VALUE *argv, VALUE self)
* io.string #=> "Hello World"
*/
void
-Init_stringio()
+Init_stringio(void)
{
VALUE StringIO = rb_define_class("StringIO", rb_cData);
diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c
index 7f93324dee..c11eebb947 100644
--- a/ext/strscan/strscan.c
+++ b/ext/strscan/strscan.c
@@ -1323,7 +1323,7 @@ inspect2(struct strscanner *p)
* There are aliases to several of the methods.
*/
void
-Init_strscan()
+Init_strscan(void)
{
ID id_scanerr = rb_intern("ScanError");
VALUE tmp;
diff --git a/ext/tk/stubs.c b/ext/tk/stubs.c
index 6c82c7a7bb..89da88aea4 100644
--- a/ext/tk/stubs.c
+++ b/ext/tk/stubs.c
@@ -24,7 +24,7 @@
static int call_macinit = 0;
static void
-_macinit()
+_macinit(void)
{
if (!call_macinit) {
tcl_macQdPtr = &qd; /* setup QuickDraw globals */
@@ -157,7 +157,7 @@ ruby_open_tcl_dll(appname)
}
int
-ruby_open_tk_dll()
+ruby_open_tk_dll(void)
{
int n;
char *ruby_tk_dll = 0;
@@ -202,13 +202,13 @@ ruby_open_tcltk_dll(appname)
}
int
-tcl_stubs_init_p()
+tcl_stubs_init_p(void)
{
return(tclStubsPtr != (TclStubs*)NULL);
}
int
-tk_stubs_init_p()
+tk_stubs_init_p(void)
{
return(tkStubsPtr != (TkStubs*)NULL);
}
@@ -285,7 +285,7 @@ ruby_tcl_create_ip_and_stubs_init(st)
}
int
-ruby_tcl_stubs_init()
+ruby_tcl_stubs_init(void)
{
int st;
Tcl_Interp *tcl_ip;
@@ -397,7 +397,7 @@ ruby_tk_stubs_safeinit(tcl_ip)
}
int
-ruby_tcltk_stubs()
+ruby_tcltk_stubs(void)
{
int st;
Tcl_Interp *tcl_ip;
@@ -467,7 +467,7 @@ ruby_open_tcl_dll(appname)
}
int
-ruby_open_tk_dll()
+ruby_open_tk_dll(void)
{
if (!open_tcl_dll) {
/* ruby_open_tcl_dll(RSTRING_PTR(rb_argv0)); */
@@ -489,13 +489,13 @@ ruby_open_tcltk_dll(appname)
}
int
-tcl_stubs_init_p()
+tcl_stubs_init_p(void)
{
return 1;
}
int
-tk_stubs_init_p()
+tk_stubs_init_p(void)
{
return call_tk_stubs_init;
}
@@ -528,7 +528,7 @@ ruby_tcl_create_ip_and_stubs_init(st)
}
int
-ruby_tcl_stubs_init()
+ruby_tcl_stubs_init(void)
{
return TCLTK_STUBS_OK;
}
@@ -582,7 +582,7 @@ ruby_tk_stubs_safeinit(tcl_ip)
}
int
-ruby_tcltk_stubs()
+ruby_tcltk_stubs(void)
{
/* Tcl_FindExecutable(RSTRING_PTR(rb_argv0)); */
Tcl_FindExecutable(rb_argv0 ? RSTRING_PTR(rb_argv0) : 0);
diff --git a/ext/tk/tcltklib.c b/ext/tk/tcltklib.c
index c67b0207c5..239f07a77b 100644
--- a/ext/tk/tcltklib.c
+++ b/ext/tk/tcltklib.c
@@ -114,7 +114,7 @@ static struct {
} tcltk_version = {0, 0, 0, 0};
static void
-set_tcltk_version()
+set_tcltk_version(void)
{
if (tcltk_version.major) return;
@@ -1057,7 +1057,7 @@ set_rubytk_kitpath(const char *kitpath)
#endif
static void
-check_tclkit_std_channels()
+check_tclkit_std_channels(void)
{
Tcl_Channel chan;
@@ -1141,7 +1141,7 @@ rubytk_kitpath_init(Tcl_Interp *interp)
/*--------------------------------------------------------*/
static void
-init_static_tcltk_packages()
+init_static_tcltk_packages(void)
{
/*
* Ensure that std channels exist (creating them if necessary)
@@ -1228,7 +1228,7 @@ void rbtk_win32_SetHINSTANCE(const char *module_name)
/*--------------------------------------------------------*/
static void
-setup_rubytkkit()
+setup_rubytkkit(void)
{
init_static_tcltk_packages();
@@ -1281,7 +1281,7 @@ setup_rubytkkit()
/* stub status */
static void
-tcl_stubs_check()
+tcl_stubs_check(void)
{
if (!tcl_stubs_init_p()) {
int st = ruby_tcl_stubs_init();
@@ -1382,7 +1382,7 @@ static int rbtk_internal_eventloop_handler = 0;
static int
-pending_exception_check0()
+pending_exception_check0(void)
{
volatile VALUE exc = rbtk_pending_exception;
@@ -1645,7 +1645,7 @@ _timer_for_tcl(clientData)
#ifdef RUBY_USE_NATIVE_THREAD
#if USE_TOGGLE_WINDOW_MODE_FOR_IDLE
static int
-toggle_eventloop_window_mode_for_idle()
+toggle_eventloop_window_mode_for_idle(void)
{
if (window_event_mode & TCL_IDLE_EVENTS) {
/* idle -> event */
@@ -2099,7 +2099,7 @@ eventloop_sleep(dummy)
#if USE_EVLOOP_THREAD_ALONE_CHECK_FLAG
static int
-get_thread_alone_check_flag()
+get_thread_alone_check_flag(void)
{
#ifdef RUBY_USE_NATIVE_THREAD
return 0;
@@ -2168,7 +2168,7 @@ trap_check(int *check_var)
}
static int
-check_eventloop_interp()
+check_eventloop_interp(void)
{
DUMP1("check eventloop_interp");
if (eventloop_interp != (Tcl_Interp*)NULL
@@ -9975,7 +9975,7 @@ lib_get_reltype_name(self)
static VALUE
-tcltklib_compile_info()
+tcltklib_compile_info(void)
{
volatile VALUE ret;
size_t size;
@@ -10714,7 +10714,7 @@ ip_make_menu_embeddable(interp, menu_path)
/*---- initialization ----*/
void
-Init_tcltklib()
+Init_tcltklib(void)
{
int ret;
diff --git a/ext/tk/tkutil/tkutil.c b/ext/tk/tkutil/tkutil.c
index cb387c5bd4..da05191773 100644
--- a/ext/tk/tkutil/tkutil.c
+++ b/ext/tk/tkutil/tkutil.c
@@ -1198,7 +1198,7 @@ allocate_cbsubst_info(struct cbsubst_info **inf_ptr)
}
static void
-cbsubst_init()
+cbsubst_init(void)
{
rb_const_set(cCB_SUBST, ID_SUBST_INFO,
allocate_cbsubst_info((struct cbsubst_info **)NULL));
@@ -1738,7 +1738,7 @@ tkobj_path(self)
const char tkutil_release_date[] = TKUTIL_RELEASE_DATE;
void
-Init_tkutil()
+Init_tkutil(void)
{
VALUE cTK = rb_define_class("TkKernel", rb_cObject);
VALUE mTK = rb_define_module("TkUtil");
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c
index 72b67fb2eb..b21d4385cc 100644
--- a/ext/win32ole/win32ole.c
+++ b/ext/win32ole/win32ole.c
@@ -375,7 +375,7 @@ static /* [local] */ HRESULT ( STDMETHODCALLTYPE Invoke )(
}
BOOL
-ole_initialized()
+ole_initialized(void)
{
return g_ole_initialized;
}
diff --git a/ext/win32ole/win32ole_event.c b/ext/win32ole/win32ole_event.c
index 55b884ff1b..ad9cb3d3f8 100644
--- a/ext/win32ole/win32ole_event.c
+++ b/ext/win32ole/win32ole_event.c
@@ -1240,7 +1240,7 @@ fev_get_handler(VALUE self)
}
void
-Init_win32ole_event()
+Init_win32ole_event(void)
{
ary_ole_event = rb_ary_new();
rb_gc_register_mark_object(ary_ole_event);
diff --git a/ext/win32ole/win32ole_param.c b/ext/win32ole/win32ole_param.c
index 661bd23578..9d28a89161 100644
--- a/ext/win32ole/win32ole_param.c
+++ b/ext/win32ole/win32ole_param.c
@@ -400,7 +400,7 @@ foleparam_inspect(VALUE self)
}
void
-Init_win32ole_param()
+Init_win32ole_param(void)
{
cWIN32OLE_PARAM = rb_define_class("WIN32OLE_PARAM", rb_cObject);
rb_define_alloc_func(cWIN32OLE_PARAM, foleparam_s_allocate);
diff --git a/ext/win32ole/win32ole_record.c b/ext/win32ole/win32ole_record.c
index b7ce75bbee..3944ffadf6 100644
--- a/ext/win32ole/win32ole_record.c
+++ b/ext/win32ole/win32ole_record.c
@@ -563,7 +563,7 @@ folerecord_inspect(VALUE self)
}
void
-Init_win32ole_record()
+Init_win32ole_record(void)
{
cWIN32OLE_RECORD = rb_define_class("WIN32OLE_RECORD", rb_cObject);
rb_define_alloc_func(cWIN32OLE_RECORD, folerecord_s_allocate);
diff --git a/ext/win32ole/win32ole_typelib.c b/ext/win32ole/win32ole_typelib.c
index f5ecd4c05c..9a8fdd56c3 100644
--- a/ext/win32ole/win32ole_typelib.c
+++ b/ext/win32ole/win32ole_typelib.c
@@ -811,7 +811,7 @@ foletypelib_inspect(VALUE self)
}
void
-Init_win32ole_typelib()
+Init_win32ole_typelib(void)
{
cWIN32OLE_TYPELIB = rb_define_class("WIN32OLE_TYPELIB", rb_cObject);
rb_define_singleton_method(cWIN32OLE_TYPELIB, "typelibs", foletypelib_s_typelibs, 0);
diff --git a/ext/win32ole/win32ole_variant.c b/ext/win32ole/win32ole_variant.c
index b0cc5ee5df..ef5227b5c9 100644
--- a/ext/win32ole/win32ole_variant.c
+++ b/ext/win32ole/win32ole_variant.c
@@ -665,7 +665,7 @@ folevariant_set_value(VALUE self, VALUE val)
}
void
-Init_win32ole_variant()
+Init_win32ole_variant(void)
{
cWIN32OLE_VARIANT = rb_define_class("WIN32OLE_VARIANT", rb_cObject);
rb_define_alloc_func(cWIN32OLE_VARIANT, folevariant_s_allocate);
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 23d561f60f..1732e740ec 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -4200,7 +4200,7 @@ rb_gzreader_readlines(int argc, VALUE *argv, VALUE obj)
#endif /* GZIP_SUPPORT */
void
-Init_zlib()
+Init_zlib(void)
{
VALUE mZlib, cZStream, cDeflate, cInflate;
#if GZIP_SUPPORT
diff --git a/hash.c b/hash.c
index 9bfc39611e..29f4b26385 100644
--- a/hash.c
+++ b/hash.c
@@ -2772,7 +2772,7 @@ getenvsize(const char* p)
return p - porg + 1;
}
static size_t
-getenvblocksize()
+getenvblocksize(void)
{
return (rb_w32_osver() >= 5) ? 32767 : 5120;
}
diff --git a/load.c b/load.c
index e88abfbb0c..3f5372c064 100644
--- a/load.c
+++ b/load.c
@@ -1159,7 +1159,7 @@ rb_f_autoload_p(VALUE obj, VALUE sym)
}
void
-Init_load()
+Init_load(void)
{
#undef rb_intern
#define rb_intern(str) rb_intern2((str), strlen(str))
diff --git a/nacl/pepper_main.c b/nacl/pepper_main.c
index c0e497b387..1ccafd9332 100644
--- a/nacl/pepper_main.c
+++ b/nacl/pepper_main.c
@@ -676,7 +676,7 @@ PPP_GetInterface(const char* interface_name)
* Called before the plugin module is unloaded.
*/
PP_EXPORT void
-PPP_ShutdownModule()
+PPP_ShutdownModule(void)
{
ruby_cleanup(0);
}
diff --git a/process.c b/process.c
index 1ea637a412..f9bc01c5c3 100644
--- a/process.c
+++ b/process.c
@@ -1126,7 +1126,7 @@ before_exec_async_signal_safe(void)
}
static void
-before_exec_non_async_signal_safe()
+before_exec_non_async_signal_safe(void)
{
/*
* On Mac OS X 10.5.x (Leopard) or earlier, exec() may return ENOTSUP
@@ -1139,7 +1139,7 @@ before_exec_non_async_signal_safe()
}
static void
-before_exec()
+before_exec(void)
{
before_exec_non_async_signal_safe();
before_exec_async_signal_safe();