Module: sip-router Branch: master Commit: 8830e341eaa524675d7bf309f900c75eab251916 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8830e341...
Author: Andrei Pelinescu-Onciul andrei@iptel.org Committer: Andrei Pelinescu-Onciul andrei@iptel.org Date: Fri Oct 9 20:59:18 2009 +0200
modules warning fixes
---
lib/binrpc/binrpc_api.c | 2 +- modules_k/siputils/contact_ops.c | 2 +- modules_k/tmx/tmx_mod.c | 2 +- modules_s/ctl/binrpc_run.c | 2 ++ modules_s/eval/eval.c | 1 + modules_s/msilo/msilo.c | 1 + modules_s/permissions/ip_set.c | 1 + 7 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/lib/binrpc/binrpc_api.c b/lib/binrpc/binrpc_api.c index c76267c..89277dd 100644 --- a/lib/binrpc/binrpc_api.c +++ b/lib/binrpc/binrpc_api.c @@ -457,7 +457,7 @@ static int get_reply(struct binrpc_handle *handle, if (n == 0) snprintf(binrpc_last_errs, sizeof(binrpc_last_errs)-1, "get_reply: read unexpected EOF: received %d bytes" - " of reply", crt - handle->buf); + " of reply", (int)(long)(crt - handle->buf)); else snprintf(binrpc_last_errs, sizeof(binrpc_last_errs)-1, "get_reply: read reply failed: %s (%d)", diff --git a/modules_k/siputils/contact_ops.c b/modules_k/siputils/contact_ops.c index 6601092..872c239 100644 --- a/modules_k/siputils/contact_ops.c +++ b/modules_k/siputils/contact_ops.c @@ -488,7 +488,7 @@ decode2format (str uri, char separator, struct uri_format *format) }
#ifdef DEBUG - fprintf (stdout, "Decoding %.*s\n",end-start,start); + fprintf (stdout, "Decoding %.*s\n", (int)(long)(end-start), start); #endif state = EX_PREFIX; diff --git a/modules_k/tmx/tmx_mod.c b/modules_k/tmx/tmx_mod.c index 4a51e7f..0c3af19 100644 --- a/modules_k/tmx/tmx_mod.c +++ b/modules_k/tmx/tmx_mod.c @@ -228,7 +228,7 @@ static int t_cancel_branches(struct sip_msg* msg, char *k, char *s2) tcx = _tmx_tmb.tm_ctx_get(); if(tcx != NULL) idx = tcx->branch_index; - n = (int)k; + n = (int)(long)k; switch(n) { case 1: /* prepare cancel for every branch except idx */ diff --git a/modules_s/ctl/binrpc_run.c b/modules_s/ctl/binrpc_run.c index aa50e8a..8ad914f 100644 --- a/modules_s/ctl/binrpc_run.c +++ b/modules_s/ctl/binrpc_run.c @@ -302,6 +302,7 @@ error:
+#if 0 /* expects an initialized new_b */ static int build_structs(struct binrpc_pkt *new_b, struct binrpc_pkt* body, struct rpc_struct_head* sl_head) @@ -323,6 +324,7 @@ static int build_structs(struct binrpc_pkt *new_b, struct binrpc_pkt* body, error: return ret; } +#endif
diff --git a/modules_s/eval/eval.c b/modules_s/eval/eval.c index 2c064b8..2c31f75 100644 --- a/modules_s/eval/eval.c +++ b/modules_s/eval/eval.c @@ -182,6 +182,7 @@ static void get_uri_and_skip_until_params(str *param_area, str *uri) { int i, quoted, uri_pos, uri_done;
uri->len = 0; + uri->s = 0; uri_done = 0; for (i=0; i<param_area->len && param_area->s[i]!=';'; ) { /* [ *(token LSW)/quoted-string ] "<" addr-spec ">" | addr-spec */ /* skip name */ diff --git a/modules_s/msilo/msilo.c b/modules_s/msilo/msilo.c index b664b9b..9aa4ebd 100644 --- a/modules_s/msilo/msilo.c +++ b/modules_s/msilo/msilo.c @@ -561,6 +561,7 @@ static int m_dump(struct sip_msg* msg, char* str1, char* str2) str next_hop = STR_NULL; uac_req_t uac_r; + i=0; /* fix warning in DBG() */ if (str1) { next_hop.s = str1; next_hop.len = strlen(str1); diff --git a/modules_s/permissions/ip_set.c b/modules_s/permissions/ip_set.c index 74bcbfa..f33297c 100644 --- a/modules_s/permissions/ip_set.c +++ b/modules_s/permissions/ip_set.c @@ -101,6 +101,7 @@ int ip_set_add_list(struct ip_set *ip_set, str ip_set_s){ ip_set_s.s += ip_s.len; ip_set_s.len -= ip_s.len; mask_s.len = 0; + mask_s.s=0; if (ip_set_s.len && ip_set_s.s[0] == '/') { ip_set_s.s++; ip_set_s.len--;