[Asterisk-code-review] res pjsip: Fix warning by deferring implicit type cast. (asterisk[15])

Corey Farrell asteriskteam at digium.com
Sun Nov 19 13:31:51 CST 2017


Corey Farrell has uploaded this change for review. ( 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(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/92/7292/1

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: newchange
Gerrit-Change-Id: I0c262c1719ee951aae1f437d733a301cf5f8ad29
Gerrit-Change-Number: 7292
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171119/89e0907a/attachment.html>


More information about the asterisk-code-review mailing list