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

Benjamin Keith Ford asteriskteam at digium.com
Wed Apr 3 10:25:38 CDT 2019


Benjamin Keith Ford has uploaded this change for review. ( 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.

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



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/19/11219/1

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: 1
Gerrit-Owner: Benjamin Keith Ford <bford at digium.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190403/6e9679c3/attachment.html>


More information about the asterisk-code-review mailing list