[Asterisk-code-review] res_pjsip_session: Avoid sometimes-uninitialized warning with Clang. (asterisk[16])

Alexander Traud asteriskteam at digium.com
Fri Jan 15 05:10:45 CST 2021


Alexander Traud has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/15356 )


Change subject: res_pjsip_session: Avoid sometimes-uninitialized warning with Clang.
......................................................................

res_pjsip_session: Avoid sometimes-uninitialized warning with Clang.

ASTERISK-29248

Change-Id: I2b17bd5ffb246bc64c463402c9831413da78a556
---
M res/res_pjsip_session.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/56/15356/1

diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c
index 1025e15..960b72d 100644
--- a/res/res_pjsip_session.c
+++ b/res/res_pjsip_session.c
@@ -2178,7 +2178,7 @@
 	pjsip_inv_session *inv_session = session->inv_session;
 	pjmedia_sdp_session *new_sdp = NULL;
 	pjsip_tx_data *tdata;
-	int res;
+	int res = -1;
 	SCOPE_ENTER(3, "%s: New SDP? %s  Queued? %s DP: %s  DA: %s\n", ast_sip_session_get_name(session),
 		generate_new_sdp ? "yes" : "no", queued ? "yes" : "no",
 		pending_media_state ? ast_str_tmp(256, ast_stream_topology_to_str(pending_media_state->topology, &STR_TMP)) : "none",

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15356
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I2b17bd5ffb246bc64c463402c9831413da78a556
Gerrit-Change-Number: 15356
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210115/1931d168/attachment.html>


More information about the asterisk-code-review mailing list