Module: sip-router Branch: master Commit: b5d6bb38c3e5d4308e373afe2c4cac5bf1410fb6 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b5d6bb38...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Mon Apr 16 13:46:40 2012 +0200
fixed compile time warnings
- init vars and remove unused ones
---
cfg/cfg_select.c | 4 ++-- modules/db_mysql/my_con.c | 2 -- modules_k/registrar/lookup.c | 1 + modules_k/usrloc/udomain.c | 3 +-- 4 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/cfg/cfg_select.c b/cfg/cfg_select.c index e68f9dc..e672cf6 100644 --- a/cfg/cfg_select.c +++ b/cfg/cfg_select.c @@ -346,7 +346,7 @@ unsigned int read_cfg_var(struct cfg_read_handle *read_handle, void **val) int read_cfg_var_int(struct cfg_read_handle *read_handle, int *val) { unsigned int type; - void *v1, *v2; + void *v1=NULL, *v2=NULL;
if ((type = read_cfg_var(read_handle, &v1)) == 0) return -1; @@ -364,7 +364,7 @@ int read_cfg_var_int(struct cfg_read_handle *read_handle, int *val) int read_cfg_var_str(struct cfg_read_handle *read_handle, str *val) { unsigned int type; - void *v1, *v2; + void *v1=NULL, *v2=NULL;
if ((type = read_cfg_var(read_handle, &v1)) == 0) return -1; diff --git a/modules/db_mysql/my_con.c b/modules/db_mysql/my_con.c index 1ead00b..d373c20 100644 --- a/modules/db_mysql/my_con.c +++ b/modules/db_mysql/my_con.c @@ -139,7 +139,6 @@ void my_con_disconnect(db_con_t* con) int my_con(db_con_t* con) { struct my_con* ptr; - struct my_uri* uri;
/* First try to lookup the connection in the connection pool and * re-use it if a match is found @@ -167,7 +166,6 @@ int my_con(db_con_t* con) } mysql_init(ptr->con);
- uri = DB_GET_PAYLOAD(con->uri); DBG("mysql: Creating new connection to: %.*s:%.*s\n", con->uri->scheme.len, ZSW(con->uri->scheme.s), con->uri->body.len, ZSW(con->uri->body.s)); diff --git a/modules_k/registrar/lookup.c b/modules_k/registrar/lookup.c index 123b642..b8ac536 100644 --- a/modules_k/registrar/lookup.c +++ b/modules_k/registrar/lookup.c @@ -100,6 +100,7 @@ int lookup(struct sip_msg* _m, udomain_t* _d, str* _uri) str inst = {0}; unsigned int ahash = 0;
+ ret = -1;
if (_m->new_uri.s) uri = _m->new_uri; else uri = _m->first_line.u.request.uri; diff --git a/modules_k/usrloc/udomain.c b/modules_k/usrloc/udomain.c index 31e27cf..6721b3e 100644 --- a/modules_k/usrloc/udomain.c +++ b/modules_k/usrloc/udomain.c @@ -643,7 +643,6 @@ urecord_t* db_load_urecord_by_ruid(db1_con_t* _c, udomain_t* _d, str *_ruid) str aor; char aorbuf[512]; str domain; - int i;
urecord_t* r; ucontact_t* c; @@ -699,7 +698,7 @@ urecord_t* db_load_urecord_by_ruid(db1_con_t* _c, udomain_t* _d, str *_ruid) /* use first row - shouldn't be more */ row = RES_ROWS(res);
- ci = dbrow2info( ROW_VALUES(RES_ROWS(res) + i), &contact); + ci = dbrow2info( ROW_VALUES(RES_ROWS(res)), &contact); if (ci==0) { LM_ERR("skipping record for %.*s in table %s\n", _ruid->len, _ruid->s, _d->name->s);