summaryrefslogtreecommitdiff
path: root/dln.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-05-07 00:04:36 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-05-07 00:04:36 +0900
commit0bbab1e5151c3396ebe544d09cad997cd9cb5e3b (patch)
tree9ca2db82ab1b42c3902733d640228bb8eeb5f638 /dln.c
parent99644514db3768e4fd47d6ff9111091ab1a5a6d2 (diff)
Protoized old pre-ANSI K&R style declarations and definitions
Diffstat (limited to 'dln.c')
-rw-r--r--dln.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/dln.c b/dln.c
index b0508989d4..ac09430492 100644
--- a/dln.c
+++ b/dln.c
@@ -312,7 +312,7 @@ dln_load(const char *file)
HINSTANCE handle;
WCHAR *winfile;
char message[1024];
- void (*init_fct)();
+ void (*init_fct)(void);
char *buf;
/* Load the file as an object one */
@@ -341,7 +341,7 @@ dln_load(const char *file)
}
#endif
- if ((init_fct = (void(*)())GetProcAddress(handle, buf)) == NULL) {
+ if ((init_fct = (void(*)(void))GetProcAddress(handle, buf)) == NULL) {
dln_loaderror("%s - %s\n%s", dln_strerror(), buf, file);
}
@@ -358,7 +358,7 @@ dln_load(const char *file)
#define DLN_DEFINED
{
void *handle;
- void (*init_fct)();
+ void (*init_fct)(void);
#ifndef RTLD_LAZY
# define RTLD_LAZY 1
@@ -393,7 +393,7 @@ dln_load(const char *file)
}
# endif
- init_fct = (void(*)())(VALUE)dlsym(handle, buf);
+ init_fct = (void(*)(void))(VALUE)dlsym(handle, buf);
if (init_fct == NULL) {
const size_t errlen = strlen(error = dln_strerror()) + 1;
error = memcpy(ALLOCA_N(char, errlen), error, errlen);
@@ -412,7 +412,7 @@ dln_load(const char *file)
{
shl_t lib = NULL;
int flags;
- void (*init_fct)();
+ void (*init_fct)(void);
flags = BIND_DEFERRED;
lib = shl_load(file, flags, 0);
@@ -436,9 +436,9 @@ dln_load(const char *file)
#if defined(_AIX)
#define DLN_DEFINED
{
- void (*init_fct)();
+ void (*init_fct)(void);
- init_fct = (void(*)())load((char*)file, 1, 0);
+ init_fct = (void(*)(void))load((char*)file, 1, 0);
if (init_fct == NULL) {
aix_loaderror(file);
}
@@ -467,7 +467,7 @@ dln_load(const char *file)
/* "file" is module file name .
"buf" is pointer to initial function name with "_" . */
- void (*init_fct)();
+ void (*init_fct)(void);
dyld_result = NSCreateObjectFileImageFromFile(file, &obj_file);