trawick 2002/11/25 07:01:17
Modified: test testdso.c
Log:
void * is not compatible with function ptrs
use the right function ptr type
Revision Changes Path
1.26 +4 -4 apr/test/testdso.c
Index: testdso.c
===================================================================
RCS file: /home/cvs/apr/test/testdso.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- testdso.c 24 Nov 2002 10:02:40 -0000 1.25
+++ testdso.c 25 Nov 2002 15:01:17 -0000 1.26
@@ -112,7 +112,7 @@
CuAssert(tc, apr_dso_error(h, errstr, 256), APR_SUCCESS == status);
CuAssertPtrNotNull(tc, func1);
- function = (void *)func1;
+ function = (void (*)(char *))func1;
(*function)(teststr);
CuAssertStrEquals(tc, "Hello - I'm a DSO!\n", teststr);
@@ -135,7 +135,7 @@
CuAssert(tc, apr_dso_error(h, errstr, 256), APR_SUCCESS == status);
CuAssertPtrNotNull(tc, func1);
- function = (void *)func1;
+ function = (int (*)(int))func1;
status = (*function)(5);
CuAssertIntEquals(tc, 5, status);
@@ -198,7 +198,7 @@
CuAssert(tc, apr_dso_error(h, errstr, 256), APR_SUCCESS == status);
CuAssertPtrNotNull(tc, func1);
- function = (void *)func1;
+ function = (void (*)(char *))func1;
(*function)(teststr);
CuAssertStrEquals(tc, "Hello - I'm a DSO!\n", teststr);
@@ -225,7 +225,7 @@
CuAssert(tc, apr_dso_error(h, errstr, 256), APR_SUCCESS == status);
CuAssertPtrNotNull(tc, func1);
- function = (void *)func1;
+ function = (int (*)(int))func1;
status = (*function)(5);
CuAssertIntEquals(tc, 5, status);