[sr-dev] git:4.3:65d55ffc: erlang: fix compile warning unused but set variable

Seudin Kasumovic seudin.kasumovic at gmail.com
Wed Apr 13 08:50:53 CEST 2016


Module: kamailio
Branch: 4.3
Commit: 65d55ffc8efcb1a50042a65a4465a17036c51a23
URL: https://github.com/kamailio/kamailio/commit/65d55ffc8efcb1a50042a65a4465a17036c51a23

Author: Seudin Kasumovic <seudin.kasumovic at gmail.com>
Committer: Seudin Kasumovic <seudin.kasumovic at gmail.com>
Date: 2016-04-13T08:50:30+02:00

erlang: fix compile warning unused but set variable

- get rid of this variable

(cherry picked from commit 32c3435c8122903958834002ba843b93c49495f0)

---

Modified: modules/erlang/erl_helpers.c

---

Diff:  https://github.com/kamailio/kamailio/commit/65d55ffc8efcb1a50042a65a4465a17036c51a23.diff
Patch: https://github.com/kamailio/kamailio/commit/65d55ffc8efcb1a50042a65a4465a17036c51a23.patch

---

diff --git a/modules/erlang/erl_helpers.c b/modules/erlang/erl_helpers.c
index f702a8b..1ec21d1 100644
--- a/modules/erlang/erl_helpers.c
+++ b/modules/erlang/erl_helpers.c
@@ -235,7 +235,6 @@ int erl_init_ec(ei_cnode *ec, const str *alivename, const str *hostname, const s
 	char nodename[MAXNODELEN];
 
 	int result;
-	int port;
 
 	/* copy the nodename into something we can modify */
 	if (snprintf(nodename, MAXNODELEN, "%.*s@%.*s", STR_FMT(alivename), STR_FMT(hostname)) >= MAXNODELEN) {
@@ -256,8 +255,6 @@ int erl_init_ec(ei_cnode *ec, const str *alivename, const str *hostname, const s
 		return -1;
 	}
 
-	port = sockaddr_port(addr);
-
 	LM_DBG("initialized ec for cnode '%s' on %.*s[%s] creation %d.\n", nodename, STR_FMT(hostname), ip_addr2strz(&ip), creation);
 
 	freeaddrinfo(ai);




More information about the sr-dev mailing list