diff options
author | kirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-07 19:21:34 +0000 |
---|---|---|
committer | kirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-07 19:21:34 +0000 |
commit | 2afd87d2c493548fe45376d09deea2ee32ea7032 (patch) | |
tree | b2b1a44715175261eb1eee6c13d346dc3d8b291b /tests | |
parent | 193702b0fbac827994df0b960475ce3ad9323c83 (diff) | |
download | ATCD-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.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/DLL_Test.cpp | 11 |
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, |