Forráskód Böngészése

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.

(cherry picked from commit ce4107a6f654a4bc4462efb90f3cc5e8c73bf9ed)
Victor Seva 11 hónapja
szülő
commit
170d35f1f1
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      src/modules/tm/t_fwd.c

+ 1 - 1
src/modules/tm/t_fwd.c

@@ -1835,7 +1835,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;