From 0c347025138f7723724e5047df91942d6aa7bcb2 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Tue, 13 Feb 2007 22:15:24 +0000 Subject: [PATCH] fix warnings on weird L value casts for function pointers. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4246 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_loadable_module.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/switch_loadable_module.c b/src/switch_loadable_module.c index f9d3a0e9ab..332daab0ec 100644 --- a/src/switch_loadable_module.c +++ b/src/switch_loadable_module.c @@ -286,6 +286,9 @@ static switch_status_t switch_loadable_module_load_file(char *filename, switch_l switch_loadable_module_t *module = NULL; apr_dso_handle_t *dso = NULL; apr_status_t status = SWITCH_STATUS_SUCCESS; + apr_dso_handle_sym_t load_function_handle = NULL; + apr_dso_handle_sym_t shutdown_function_handle = NULL; + apr_dso_handle_sym_t runtime_function_handle = NULL; switch_module_load_t load_func_ptr = NULL; int loading = 1; const char *err = NULL; @@ -304,7 +307,8 @@ static switch_status_t switch_loadable_module_load_file(char *filename, switch_l break; } - status = apr_dso_sym((apr_dso_handle_sym_t *)&load_func_ptr, dso, "switch_module_load"); + status = apr_dso_sym(&load_function_handle, dso, "switch_module_load"); + load_func_ptr = (switch_module_load_t)(intptr_t) load_function_handle; if (load_func_ptr == NULL) { err = "Cannot locate symbol 'switch_module_load' please make sure this is a vaild module."; @@ -334,8 +338,10 @@ static switch_status_t switch_loadable_module_load_file(char *filename, switch_l module->module_interface = module_interface; module->switch_module_load = load_func_ptr; - apr_dso_sym((apr_dso_handle_sym_t *)&module->switch_module_shutdown, dso, "switch_module_shutdown"); - apr_dso_sym((apr_dso_handle_sym_t *)&module->switch_module_runtime, dso, "switch_module_runtime"); + apr_dso_sym(&shutdown_function_handle, dso, "switch_module_shutdown"); + module->switch_module_shutdown = (switch_module_shutdown_t)(intptr_t) shutdown_function_handle; + apr_dso_sym(&runtime_function_handle, dso, "switch_module_runtime"); + module->switch_module_runtime = (switch_module_runtime_t)(intptr_t) runtime_function_handle; module->lib = dso;