From fcda626f3cd15eea04270acd4a7ee596b7dc5555 Mon Sep 17 00:00:00 2001 From: Sean Bright Date: Fri, 22 May 2009 16:10:33 +0000 Subject: [PATCH] Fix build under dev mode and remove some casts that are no longer necessary as a result of the const-ify the world patch. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196227 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_dahdi.c | 2 +- main/pbx.c | 4 ++++ res/res_jabber.c | 2 +- res/res_monitor.c | 4 ++-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index ce490e6ad7..fed6c1264c 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -3991,7 +3991,7 @@ static int dahdi_send_keypad_facility_exec(struct ast_channel *chan, const char { /* Data will be our digit string */ struct dahdi_pvt *p; - const char *digits = (const char *) data; + const char *digits = data; if (ast_strlen_zero(digits)) { ast_debug(1, "No digit string sent to application!\n"); diff --git a/main/pbx.c b/main/pbx.c index c567634599..f64810e16d 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -942,7 +942,9 @@ static int pbx_builtin_saydigits(struct ast_channel *, const char *); static int pbx_builtin_saycharacters(struct ast_channel *, const char *); static int pbx_builtin_sayphonetic(struct ast_channel *, const char *); static int matchcid(const char *cidpattern, const char *callerid); +#ifdef NEED_DEBUG static void log_match_char_tree(struct match_char *node, char *prefix); /* for use anywhere */ +#endif static int pbx_builtin_importvar(struct ast_channel *, const char *); static void set_ext_pri(struct ast_channel *c, const char *exten, int pri); static void new_find_extension(const char *str, struct scoreboard *score, @@ -1488,6 +1490,7 @@ static void update_scoreboard(struct scoreboard *board, int length, int spec, st #endif } +#ifdef NEED_DEBUG static void log_match_char_tree(struct match_char *node, char *prefix) { char extenstr[40]; @@ -1516,6 +1519,7 @@ static void log_match_char_tree(struct match_char *node, char *prefix) if (node->alt_char) log_match_char_tree(node->alt_char, prefix); } +#endif static void cli_match_char_tree(struct match_char *node, char *prefix, int fd) { diff --git a/res/res_jabber.c b/res/res_jabber.c index 72f14960cb..314e9919a3 100644 --- a/res/res_jabber.c +++ b/res/res_jabber.c @@ -561,7 +561,7 @@ static int aji_send_exec(struct ast_channel *chan, const char *data) AST_STANDARD_APP_ARGS(args, s); if (args.argc < 3) { - ast_log(LOG_ERROR, "JabberSend requires 3 arguments: '%s'\n", (char *) data); + ast_log(LOG_ERROR, "JabberSend requires 3 arguments: '%s'\n", data); return -1; } diff --git a/res/res_monitor.c b/res/res_monitor.c index 491ee0c704..83bd0a5a70 100644 --- a/res/res_monitor.c +++ b/res/res_monitor.c @@ -476,12 +476,12 @@ static int start_monitor_exec(struct ast_channel *chan, const char *data) ); /* Parse arguments. */ - if (ast_strlen_zero((char*)data)) { + if (ast_strlen_zero(data)) { ast_log(LOG_ERROR, "Monitor requires an argument\n"); return 0; } - parse = ast_strdupa((char*)data); + parse = ast_strdupa(data); AST_STANDARD_APP_ARGS(args, parse); if (!ast_strlen_zero(args.options)) {