[sr-dev] git:master:32c3435c: erlang: fix compile warning unused but set variable

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


Module: kamailio
Branch: master
Commit: 32c3435c8122903958834002ba843b93c49495f0
URL: https://github.com/kamailio/kamailio/commit/32c3435c8122903958834002ba843b93c49495f0

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

erlang: fix compile warning unused but set variable

- get rid of this variable

---

Modified: modules/erlang/erl_helpers.c

---

Diff:  https://github.com/kamailio/kamailio/commit/32c3435c8122903958834002ba843b93c49495f0.diff
Patch: https://github.com/kamailio/kamailio/commit/32c3435c8122903958834002ba843b93c49495f0.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