From 681b8e94eb522870bfa5e2d1c93983c7030fc826 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Tue, 13 Feb 2007 20:59:17 +0000 Subject: [PATCH] we can't cast from apr_dso_sym_t directly to a function pointer (c99 says no no) so we must cast to intptr_t first. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4240 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/languages/mod_spidermonkey/mod_spidermonkey.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c b/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c index c1ba842813..586a4c2a6e 100644 --- a/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c +++ b/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c @@ -460,7 +460,7 @@ static switch_status_t sm_load_file(char *filename) } status = apr_dso_sym(&function_handle, dso, "spidermonkey_init"); - spidermonkey_init = (spidermonkey_init_t) function_handle; + spidermonkey_init = (spidermonkey_init_t)(intptr_t) function_handle; if (spidermonkey_init == NULL) { err = "Cannot Load"; @@ -2209,12 +2209,12 @@ static JSBool js_log(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsva } if ((msg = JS_GetStringBytes(JS_ValueToString(cx, argv[1])))) { - switch_log_printf(SWITCH_CHANNEL_ID_LOG, (char*) file, "console_log", line, level, "%s", msg); + switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, "console_log", line, level, "%s", msg); return JS_TRUE; } } else if (argc > 0) { if ((msg = JS_GetStringBytes(JS_ValueToString(cx, argv[0])))) { - switch_log_printf(SWITCH_CHANNEL_ID_LOG, (char*) file, "console_log", line, level, "%s", msg); + switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, "console_log", line, level, "%s", msg); return JS_TRUE; } }