about summary refs log tree commit diff
path: root/dlfcn
diff options
context:
space:
mode:
Diffstat (limited to 'dlfcn')
-rw-r--r--dlfcn/default.c6
-rw-r--r--dlfcn/defaultmod1.c6
-rw-r--r--dlfcn/defaultmod2.c6
3 files changed, 9 insertions, 9 deletions
diff --git a/dlfcn/default.c b/dlfcn/default.c
index e5d5275ff5..eeed5a950a 100644
--- a/dlfcn/default.c
+++ b/dlfcn/default.c
@@ -36,7 +36,7 @@ main (int argc, char *argv[])
       printf ("%s: main not found\n", __FILE__);
       result = 1;
     }
-  else if (p != (void *) &main)
+  else if ((int (*)(int, char **))p != main)
     {
       printf ("%s: wrong address returned for main\n", __FILE__);
       result = 1;
@@ -72,9 +72,9 @@ main (int argc, char *argv[])
   else
     printf ("%s: found_in_mod2 correctly found\n", __FILE__);
 
-  result |= test_in_mod1 ((void *) &main);
+  result |= test_in_mod1 (main);
 
-  result |= test_in_mod2 ((void *) &main);
+  result |= test_in_mod2 (main);
 
   return result;
 }
diff --git a/dlfcn/defaultmod1.c b/dlfcn/defaultmod1.c
index 9f330b7f29..47d229d6b0 100644
--- a/dlfcn/defaultmod1.c
+++ b/dlfcn/defaultmod1.c
@@ -9,9 +9,9 @@ found_in_mod1 (void)
 }
 
 
-extern int test_in_mod1 (void *mainp);
+extern int test_in_mod1 (int (*mainp)(int, char **));
 int
-test_in_mod1 (void *mainp)
+test_in_mod1 (int (*mainp)(int, char **))
 {
   int (*ifp) (void);
   void *p;
@@ -24,7 +24,7 @@ test_in_mod1 (void *mainp)
       printf ("%s: main not found\n", __FILE__);
       result = 1;
     }
-  else if (p != mainp)
+  else if ((int (*)(int, char **))p != mainp)
     {
       printf ("%s: wrong address returned for main\n", __FILE__);
       result = 1;
diff --git a/dlfcn/defaultmod2.c b/dlfcn/defaultmod2.c
index c8615e2dc3..e0b170815c 100644
--- a/dlfcn/defaultmod2.c
+++ b/dlfcn/defaultmod2.c
@@ -16,9 +16,9 @@ found_in_mod2 (void)
 }
 
 
-extern int test_in_mod2 (void *mainp);
+extern int test_in_mod2 (int (*mainp)(int, char **));
 int
-test_in_mod2 (void *mainp)
+test_in_mod2 (int (*mainp)(int, char **))
 {
   int (*ifp) (void);
   void *p;
@@ -31,7 +31,7 @@ test_in_mod2 (void *mainp)
       printf ("%s: main not found\n", __FILE__);
       result = 1;
     }
-  else if (p != mainp)
+  else if ((int (*)(int, char **))p != mainp)
     {
       printf ("%s: wrong address returned for main\n", __FILE__);
       result = 1;