[Asterisk-code-review] build: Fix compiler warnings/errors. (...asterisk[13])

Friendly Automation asteriskteam at digium.com
Thu Apr 4 07:59:38 CDT 2019


Friendly Automation has submitted this change and it was merged. ( https://gerrit.asterisk.org/c/asterisk/+/11219 )

Change subject: build: Fix compiler warnings/errors.
......................................................................

build: Fix compiler warnings/errors.

The compiler complained about a couple of variables that weren't
initialized but were being used. Initializing them to NULL resolves the
warnings/errors.

ASTERISK-28362 #close

Change-Id: I6243afc5459b416edff6bbf571b0489f6b852e4b
---
M channels/chan_sip.c
M pbx/pbx_dundi.c
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Sean Bright: Looks good to me, but someone else must approve
  Christian Savinovich: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved
  Friendly Automation: Approved for Submit



diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index ce88e52..6836db3 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -11583,7 +11583,7 @@
 				ast_verbose("Discarded description format %s for ID %u\n", mimeSubtype, codec);
 		}
 	} else if (!strncmp(a, red_fmtp, strlen(red_fmtp))) {
-		char *rest;
+		char *rest = NULL;
 		/* count numbers of generations in fmtp */
 		red_cp = &red_fmtp[strlen(red_fmtp)];
 		strncpy(red_fmtp, a, 100);
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index 5c36c5a..83a1f70 100644
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -3049,7 +3049,7 @@
 	ast_cli(a->fd, FORMAT2, "Prefix", "Context", "Expiration", "From");
 
 	for (db_entry = db_tree; db_entry; db_entry = db_entry->next) {
-		char *rest;
+		char *rest = NULL;
 
 		if (ast_get_time_t(db_entry->data, &ts, 0, &length)) {
 			continue;

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

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I6243afc5459b416edff6bbf571b0489f6b852e4b
Gerrit-Change-Number: 11219
Gerrit-PatchSet: 2
Gerrit-Owner: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Christian Savinovich <csavinovich at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at digium.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/20190404/6b31fb98/attachment-0001.html>


More information about the asterisk-code-review mailing list