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

Joshua Colp asteriskteam at digium.com
Mon Jan 18 10:36:31 CST 2021


Joshua Colp has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/15355 )

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(-)

Approvals:
  Sean Bright: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Joshua Colp: Approved for Submit



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

Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: I2b17bd5ffb246bc64c463402c9831413da78a556
Gerrit-Change-Number: 15355
Gerrit-PatchSet: 2
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210118/3471fe76/attachment.html>


More information about the asterisk-code-review mailing list