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

Alexander Traud asteriskteam at digium.com
Fri Jan 15 05:11:01 CST 2021


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


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/57/15357/1

diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c
index dfbc9a6..a8cd02f 100644
--- a/res/res_pjsip_session.c
+++ b/res/res_pjsip_session.c
@@ -2177,7 +2177,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/+/15357
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: certified/16.8
Gerrit-Change-Id: I2b17bd5ffb246bc64c463402c9831413da78a556
Gerrit-Change-Number: 15357
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/8468c951/attachment.html>


More information about the asterisk-code-review mailing list