Browse code

ims_qos: fix compiler warnings

> rx_avp.c:955:19: warning: 'port_rtcp_b.len' may be used uninitialized in this function [-Wmaybe-uninitialized]
> len2 = (permit_in.len + from_s.len + to_s.len + 3 /*for 'any'*/ + ipB->len + 4 +
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> proto_len + port_rtcp_b.len + 1/*nul terminator*/) * sizeof(char);
> ~~~~~~~~~~^~~~~~~~~~~~~~~~~
> rx_avp.c:1055:19: warning: 'port_rtcp_a.len' may be used uninitialized in this function [-Wmaybe-uninitialized]
> len2 = (permit_in.len + from_s.len + to_s.len + 3 /*for 'any'*/ + ipA->len + 4 +
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> proto_len + port_rtcp_a.len + 1/*nul terminator*/) * sizeof(char);
> ~~~~~~~~~~^~~~~~~~~~~~~~~~~

Victor Seva authored on 16/01/2017 09:11:44
Showing 1 changed files
... ...
@@ -680,7 +680,7 @@ AAA_AVP *rx_create_media_subcomponent_avp(int number, str* proto,
680 680
 		
681 681
 		int len, len2;
682 682
 		int int_port_rctp_a,int_port_rctp_b;
683
-		str port_rtcp_a, port_rtcp_b;
683
+		str port_rtcp_a = STR_NULL, port_rtcp_b = STR_NULL;
684 684
 		AAA_AVP *flow_description1 = 0, *flow_description2 = 0, *flow_description3 = 0, *flow_description4 = 0, *flow_number = 0;
685 685
 		AAA_AVP *flow_description5 = 0, *flow_description6 = 0, *flow_description7 = 0, *flow_description8 = 0;
686 686
 		AAA_AVP *flow_usage = 0;