Browse code

core: fixed some bening (-Wunused-var) warnings displayed by clang

Core builds with no errors/warning

Marius Zbihlei authored on 17/09/2012 14:21:37
Showing 3 changed files
... ...
@@ -140,7 +140,7 @@ struct onsend_info* p_onsend=0; /* onsend route send info */
140 140
 				if ((dst)[i+2].type == RVE_FREE_FIXUP_ST) {\
141 141
 					/* call free_fixup (which should restore the original
142 142
 					   string) */ \
143
-					call_fixup((cmd)->free_fixup, &(dst)[i+2].u.data, i+1); \
143
+					(void)call_fixup((cmd)->free_fixup, &(dst)[i+2].u.data, i+1); \
144 144
 				} else if ((dst)[i+2].type == FPARAM_DYN_ST) {\
145 145
 					/* completely frees fparam and restore original string */\
146 146
 					fparam_free_restore(&(dst)[i+2].u.data); \
... ...
@@ -648,7 +648,7 @@ int forward_request(struct sip_msg* msg, str* dst, unsigned short port,
648 648
 		if (msg_send(send_info, buf, len)<0){
649 649
 			ret=ser_error=E_SEND;
650 650
 #ifdef USE_DST_BLACKLIST
651
-			dst_blacklist_add(BLST_ERR_SEND, send_info, msg);
651
+			(void)dst_blacklist_add(BLST_ERR_SEND, send_info, msg);
652 652
 #endif
653 653
 #ifdef USE_DNS_FAILOVER
654 654
 			continue; /* try another ip */
... ...
@@ -709,7 +709,7 @@ inline static int _wbufq_add(struct  tcp_connection* c, const char* data,
709 709
 		if (q->first && TICKS_LT(q->wr_timeout, t)){
710 710
 			if (unlikely(c->state==S_CONN_CONNECT)){
711 711
 #ifdef USE_DST_BLACKLIST
712
-				dst_blacklist_su( BLST_ERR_CONNECT, c->rcv.proto,
712
+				(void)dst_blacklist_su( BLST_ERR_CONNECT, c->rcv.proto,
713 713
 										&c->rcv.src_su, &c->send_flags, 0);
714 714
 #endif /* USE_DST_BLACKLIST */
715 715
 				TCP_EV_CONNECT_TIMEOUT(0, TCP_LADDR(c), TCP_LPORT(c),
... ...
@@ -717,7 +717,7 @@ inline static int _wbufq_add(struct  tcp_connection* c, const char* data,
717 717
 				TCP_STATS_CONNECT_FAILED();
718 718
 			}else{
719 719
 #ifdef USE_DST_BLACKLIST
720
-				dst_blacklist_su( BLST_ERR_SEND, c->rcv.proto,
720
+				(void)dst_blacklist_su( BLST_ERR_SEND, c->rcv.proto,
721 721
 									&c->rcv.src_su, &c->send_flags, 0);
722 722
 #endif /* USE_DST_BLACKLIST */
723 723
 				TCP_EV_SEND_TIMEOUT(0, &c->rcv);
... ...
@@ -3433,7 +3433,7 @@ inline static int handle_tcp_child(struct tcp_child* tcp_c, int fd_i)
3433 3433
 					/* timeout */
3434 3434
 					if (unlikely(tcpconn->state==S_CONN_CONNECT)){
3435 3435
 #ifdef USE_DST_BLACKLIST
3436
-						dst_blacklist_su( BLST_ERR_CONNECT,
3436
+						(void)dst_blacklist_su( BLST_ERR_CONNECT,
3437 3437
 											tcpconn->rcv.proto,
3438 3438
 											&tcpconn->rcv.src_su,
3439 3439
 											&tcpconn->send_flags, 0);
... ...
@@ -3444,7 +3444,7 @@ inline static int handle_tcp_child(struct tcp_child* tcp_c, int fd_i)
3444 3444
 						TCP_STATS_CONNECT_FAILED();
3445 3445
 					}else{
3446 3446
 #ifdef USE_DST_BLACKLIST
3447
-						dst_blacklist_su( BLST_ERR_SEND,
3447
+						(void)dst_blacklist_su( BLST_ERR_SEND,
3448 3448
 											tcpconn->rcv.proto,
3449 3449
 											&tcpconn->rcv.src_su,
3450 3450
 											&tcpconn->send_flags, 0);
... ...
@@ -4222,7 +4222,7 @@ inline static int handle_tcpconn_ev(struct tcp_connection* tcpconn, short ev,
4222 4222
 			if (unlikely(ev & POLLERR)){
4223 4223
 				if (unlikely(tcpconn->state==S_CONN_CONNECT)){
4224 4224
 #ifdef USE_DST_BLACKLIST
4225
-					dst_blacklist_su(BLST_ERR_CONNECT, tcpconn->rcv.proto,
4225
+					(void)dst_blacklist_su(BLST_ERR_CONNECT, tcpconn->rcv.proto,
4226 4226
 										&tcpconn->rcv.src_su,
4227 4227
 										&tcpconn->send_flags, 0);
4228 4228
 #endif /* USE_DST_BLACKLIST */
... ...
@@ -4232,7 +4232,7 @@ inline static int handle_tcpconn_ev(struct tcp_connection* tcpconn, short ev,
4232 4232
 					TCP_STATS_CONNECT_FAILED();
4233 4233
 				}else{
4234 4234
 #ifdef USE_DST_BLACKLIST
4235
-					dst_blacklist_su(BLST_ERR_SEND, tcpconn->rcv.proto,
4235
+					(void)dst_blacklist_su(BLST_ERR_SEND, tcpconn->rcv.proto,
4236 4236
 										&tcpconn->rcv.src_su,
4237 4237
 										&tcpconn->send_flags, 0);
4238 4238
 #endif /* USE_DST_BLACKLIST */
... ...
@@ -4409,7 +4409,7 @@ static ticks_t tcpconn_main_timeout(ticks_t t, struct timer_ln* tl, void* data)
4409 4409
 	if (tcp_async && _wbufq_non_empty(c) && TICKS_GE(t, c->wbuf_q.wr_timeout)){
4410 4410
 		if (unlikely(c->state==S_CONN_CONNECT)){
4411 4411
 #ifdef USE_DST_BLACKLIST
4412
-			dst_blacklist_su(BLST_ERR_CONNECT, c->rcv.proto, &c->rcv.src_su,
4412
+			(void)dst_blacklist_su(BLST_ERR_CONNECT, c->rcv.proto, &c->rcv.src_su,
4413 4413
 								&c->send_flags, 0);
4414 4414
 #endif /* USE_DST_BLACKLIST */
4415 4415
 			TCP_EV_CONNECT_TIMEOUT(0, TCP_LADDR(c), TCP_LPORT(c), TCP_PSU(c),
... ...
@@ -4417,7 +4417,7 @@ static ticks_t tcpconn_main_timeout(ticks_t t, struct timer_ln* tl, void* data)
4417 4417
 			TCP_STATS_CONNECT_FAILED();
4418 4418
 		}else{
4419 4419
 #ifdef USE_DST_BLACKLIST
4420
-			dst_blacklist_su(BLST_ERR_SEND, c->rcv.proto, &c->rcv.src_su,
4420
+			(void)dst_blacklist_su(BLST_ERR_SEND, c->rcv.proto, &c->rcv.src_su,
4421 4421
 								&c->send_flags, 0);
4422 4422
 #endif /* USE_DST_BLACKLIST */
4423 4423
 			TCP_EV_SEND_TIMEOUT(0, &c->rcv);