Module: kamailio
Branch: master
Commit: ce4107a6f654a4bc4462efb90f3cc5e8c73bf9ed
URL:
https://github.com/kamailio/kamailio/commit/ce4107a6f654a4bc4462efb90f3cc5e…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2024-10-08T13:05:19+02:00
tm: fix warning uninitialized variable
Warning: t_fwd.c:1919:46: warning: variable
'port' is uninitialized when used here [-Wuninitialized]
ret = forward_request_uac(p_msg, &host, port,
&dst);
^~~~
t_fwd.c:1843:21: note: initialize the variable 'port' to silence this warning
unsigned short port;
^
= 0
1 warning generated.
---
Modified: src/modules/tm/t_fwd.c
---
Diff:
https://github.com/kamailio/kamailio/commit/ce4107a6f654a4bc4462efb90f3cc5e…
Patch:
https://github.com/kamailio/kamailio/commit/ce4107a6f654a4bc4462efb90f3cc5e…
---
diff --git a/src/modules/tm/t_fwd.c b/src/modules/tm/t_fwd.c
index 9568b6adb1b..23e61ae818b 100644
--- a/src/modules/tm/t_fwd.c
+++ b/src/modules/tm/t_fwd.c
@@ -1840,7 +1840,7 @@ int t_forward_cancel(struct sip_msg *p_msg, struct proxy_l *proxy,
int proto,
int new_tran;
struct dest_info dst;
str host;
- unsigned short port;
+ unsigned short port = 0;
short comp;
t = 0;