summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-06-07 19:21:34 +0000
committerkirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-06-07 19:21:34 +0000
commit2afd87d2c493548fe45376d09deea2ee32ea7032 (patch)
treeb2b1a44715175261eb1eee6c13d346dc3d8b291b
parent193702b0fbac827994df0b960475ce3ad9323c83 (diff)
downloadATCD-2afd87d2c493548fe45376d09deea2ee32ea7032.tar.gz
the ANSI C++ spec says you can no longer cast a void* to a function
pointer. Made changes to remove this warning.
-rw-r--r--tests/DLL_Test.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/DLL_Test.cpp b/tests/DLL_Test.cpp
index bffa8de38c0..73d503e27e6 100644
--- a/tests/DLL_Test.cpp
+++ b/tests/DLL_Test.cpp
@@ -87,7 +87,16 @@ main (int argc, char *argv[])
dll.error ()),
-1);
- TC f = (TC) dll.symbol ("get_hello");
+ // Just becos the ANSI C++ spec says you can no longer cast a void* to a
+ // function pointer. Doesnt allow:TC f = (TC) dll.symbol ("get_hello");
+ void * foo;
+
+ foo = dll.symbol ("get_hello");
+
+ // Cast the void* to long first.
+ long tmp = ACE_reinterpret_cast (long, foo);
+
+ TC f = ACE_reinterpret_cast (Hello * (*)(void), tmp);
if (f == 0)
ACE_ERROR_RETURN ((LM_ERROR,