Module: kamailio
Branch: master
Commit: 90df744978ee2a83700d36ef88161f00b2220acb
URL:
https://github.com/kamailio/kamailio/commit/90df744978ee2a83700d36ef88161f0…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2023-12-22T10:00:32+01:00
pv: fix build warning
CC (gcc) [M pv.so] pv_xavp.o
pv_core.c: In function 'pv_get_cnt':
pv_core.c:2841:61: warning: 'ravp' may be used uninitialized
[-Wmaybe-uninitialized]
2841 | if(ravp && ravp->val.type ==
SR_XTYPE_XAVP) {
| ~~~~~~~~~^~~~~
pv_core.c:2776:36: note: 'ravp' was declared here
2776 | sr_xavp_t *ravp, *sub_avp;
| ^~~~
---
Modified: src/modules/pv/pv_core.c
---
Diff:
https://github.com/kamailio/kamailio/commit/90df744978ee2a83700d36ef88161f0…
Patch:
https://github.com/kamailio/kamailio/commit/90df744978ee2a83700d36ef88161f0…
---
diff --git a/src/modules/pv/pv_core.c b/src/modules/pv/pv_core.c
index 03d025bba2f..d98abbf975d 100644
--- a/src/modules/pv/pv_core.c
+++ b/src/modules/pv/pv_core.c
@@ -2773,7 +2773,7 @@ int pv_get_cnt(struct sip_msg *msg, pv_param_t *param, pv_value_t
*res)
* But this would be less intuitive in our case for counting.
*/
pv_xavp_name_t *xname, *xname_sub;
- sr_xavp_t *ravp, *sub_avp;
+ sr_xavp_t *ravp = NULL, *sub_avp = NULL;
int root_idxf, root_idx_spec, root_idx;
int sub_idxf, sub_idx_spec, sub_idx;
int count;