From dd1cc7791c6ef248383fb4a6983f8baf0be13863 Mon Sep 17 00:00:00 2001 From: Ben Ford <bford@digium.com> Date: Wed, 3 Apr 2019 10:24:06 -0500 Subject: [PATCH] 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 --- channels/chan_sip.c | 2 +- pbx/pbx_dundi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index b5bfad4355..bb2de27db0 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -11637,7 +11637,7 @@ static int process_sdp_a_text(const char *a, struct sip_pvt *p, struct ast_rtp_c 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 f0d586dfcc..fa90cb82ac 100644 --- a/pbx/pbx_dundi.c +++ b/pbx/pbx_dundi.c @@ -3071,7 +3071,7 @@ static char *dundi_show_hints(struct ast_cli_entry *e, int cmd, struct ast_cli_a 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; -- GitLab