modules warning fixes
authorAndrei Pelinescu-Onciul <andrei@iptel.org>
Fri, 9 Oct 2009 18:59:18 +0000 (20:59 +0200)
committerAndrei Pelinescu-Onciul <andrei@iptel.org>
Fri, 9 Oct 2009 19:04:10 +0000 (21:04 +0200)
lib/binrpc/binrpc_api.c
modules_k/siputils/contact_ops.c
modules_k/tmx/tmx_mod.c
modules_s/ctl/binrpc_run.c
modules_s/eval/eval.c
modules_s/msilo/msilo.c
modules_s/permissions/ip_set.c

index c76267c..89277dd 100644 (file)
@@ -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)",
index 6601092..872c239 100644 (file)
@@ -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;
index 4a51e7f..0c3af19 100644 (file)
@@ -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 */
index aa50e8a..8ad914f 100644 (file)
@@ -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
 
 
 
index 2c064b8..2c31f75 100644 (file)
@@ -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 */
index b664b9b..9aa4ebd 100644 (file)
@@ -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);
index 74bcbfa..f33297c 100644 (file)
@@ -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--;