[Asterisk-code-review] res pjsip: Fix warning by deferring implicit type cast. (asterisk[15])
Joshua Colp
asteriskteam at digium.com
Mon Nov 20 10:21:48 CST 2017
Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/7292 )
Change subject: res_pjsip: Fix warning by deferring implicit type cast.
......................................................................
res_pjsip: Fix warning by deferring implicit type cast.
Mac doesn't like the comparison of -1 to an enum, so store the result of
ast_sip_str_to_dtmf to an int so we can check for the negative return
value. ast_sip_str_to_dtmf returns an int so this is only delaying the
implicit type cast.
Change-Id: I0c262c1719ee951aae1f437d733a301cf5f8ad29
---
M res/res_pjsip/pjsip_configuration.c
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Richard Mudgett: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved; Approved for Submit
diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c
index 168d869..e63e158 100644
--- a/res/res_pjsip/pjsip_configuration.c
+++ b/res/res_pjsip/pjsip_configuration.c
@@ -366,7 +366,7 @@
static int dtmf_handler(const struct aco_option *opt, struct ast_variable *var, void *obj)
{
struct ast_sip_endpoint *endpoint = obj;
- enum ast_sip_dtmf_mode dtmf = ast_sip_str_to_dtmf(var->value);
+ int dtmf = ast_sip_str_to_dtmf(var->value);
if (dtmf == -1) {
return -1;
--
To view, visit https://gerrit.asterisk.org/7292
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: I0c262c1719ee951aae1f437d733a301cf5f8ad29
Gerrit-Change-Number: 7292
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171120/60b5c71c/attachment.html>
More information about the asterisk-code-review
mailing list