Module: kamailio
Branch: master
Commit: 73557ec8db6747f7fb1544e558eec385880d5ed2
URL:
https://github.com/kamailio/kamailio/commit/73557ec8db6747f7fb1544e558eec38…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2017-01-16T10:11:44+01:00
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);
~~~~~~~~~~^~~~~~~~~~~~~~~~~
---
Modified: src/modules/ims_qos/rx_avp.c
---
Diff:
https://github.com/kamailio/kamailio/commit/73557ec8db6747f7fb1544e558eec38…
Patch:
https://github.com/kamailio/kamailio/commit/73557ec8db6747f7fb1544e558eec38…
---
diff --git a/src/modules/ims_qos/rx_avp.c b/src/modules/ims_qos/rx_avp.c
index ecdbee0..fcf529e 100644
--- a/src/modules/ims_qos/rx_avp.c
+++ b/src/modules/ims_qos/rx_avp.c
@@ -680,7 +680,7 @@ AAA_AVP *rx_create_media_subcomponent_avp(int number, str* proto,
int len, len2;
int int_port_rctp_a,int_port_rctp_b;
- str port_rtcp_a, port_rtcp_b;
+ str port_rtcp_a = STR_NULL, port_rtcp_b = STR_NULL;
AAA_AVP *flow_description1 = 0, *flow_description2 = 0, *flow_description3 = 0,
*flow_description4 = 0, *flow_number = 0;
AAA_AVP *flow_description5 = 0, *flow_description6 = 0, *flow_description7 = 0,
*flow_description8 = 0;
AAA_AVP *flow_usage = 0;