Bläddra i källkod

modules warning fixes

Andrei Pelinescu-Onciul 16 år sedan
förälder
incheckning
8830e341ea

+ 1 - 1
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)",

+ 1 - 1
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;

+ 1 - 1
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 */

+ 2 - 0
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
 
 
 

+ 1 - 0
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 */

+ 1 - 0
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);

+ 1 - 0
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--;