[sr-dev] git:master:4e856f95: rtjon: fixed compile warnings and branch index iteration

Daniel-Constantin Mierla miconda at gmail.com
Tue May 12 10:14:26 CEST 2015


Module: kamailio
Branch: master
Commit: 4e856f952575722914fa0f609a538ef3fc670a94
URL: https://github.com/kamailio/kamailio/commit/4e856f952575722914fa0f609a538ef3fc670a94

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-05-12T10:13:39+02:00

rtjon: fixed compile warnings and branch index iteration

---

Modified: modules/rtjson/rtjson_routing.c

---

Diff:  https://github.com/kamailio/kamailio/commit/4e856f952575722914fa0f609a538ef3fc670a94.diff
Patch: https://github.com/kamailio/kamailio/commit/4e856f952575722914fa0f609a538ef3fc670a94.patch

---

diff --git a/modules/rtjson/rtjson_routing.c b/modules/rtjson/rtjson_routing.c
index 2b46036..f8d6fdf 100644
--- a/modules/rtjson/rtjson_routing.c
+++ b/modules/rtjson/rtjson_routing.c
@@ -393,7 +393,6 @@ int rtjson_prepare_branch(sip_msg_t *msg, srjson_doc_t *jdoc, srjson_t *nj)
 	str xdsp = {0};
 	str xuri = {0};
 	str xhdr = {0};
-	unsigned int bflags = 0;
 	unsigned int fr = 0;
 	unsigned int fr_inv = 0;
 	struct lump *anchor = NULL;
@@ -574,7 +573,6 @@ int rtjson_next_route(sip_msg_t *msg)
 	srjson_t *nj = NULL;
 	str val;
 	str xname;
-	int ret;
 	int i;
 
 	xname.s = "json";
@@ -621,8 +619,10 @@ int rtjson_next_route(sip_msg_t *msg)
 		goto error;
 	}
 
+	i = 0;
 	while(nj && i<iavp->val.v.i) {
 		nj = nj->next;
+		i++;
 	}
 	if(nj==NULL)
 		goto error;
@@ -650,7 +650,6 @@ int rtjson_update_branch(sip_msg_t *msg)
 	srjson_t *nj = NULL;
 	str val;
 	str xname;
-	int ret;
 	int i;
 
 	xname.s = "json";
@@ -697,8 +696,10 @@ int rtjson_update_branch(sip_msg_t *msg)
 		goto error;
 	}
 
+	i = 0;
 	while(nj && i<iavp->val.v.i) {
 		nj = nj->next;
+		i++;
 	}
 	if(nj==NULL)
 		goto error;




More information about the sr-dev mailing list