diff --git a/apps/app_stack.c b/apps/app_stack.c index 6f5093e097..1b76519068 100644 --- a/apps/app_stack.c +++ b/apps/app_stack.c @@ -464,7 +464,9 @@ static int handle_gosub(struct ast_channel *chan, AGI *agi, int argc, char **arg if ((res = pbx_exec(chan, theapp, gosub_args)) == 0) { struct ast_pbx *pbx = chan->pbx; - struct ast_pbx_args args = { .no_hangup_chan = 1 }; + struct ast_pbx_args args; + memset(&args, 0, sizeof(args)); + args.no_hangup_chan = 1; /* Suppress warning about PBX already existing */ chan->pbx = NULL; ast_agi_send(agi->fd, chan, "100 result=0 Trying...\n"); @@ -501,8 +503,6 @@ struct agi_command gosub_agi_command = static int unload_module(void) { - struct ast_context *con; - if (ast_agi_unregister) { ast_agi_unregister(ast_module_info->self, &gosub_agi_command); } @@ -518,8 +518,6 @@ static int unload_module(void) static int load_module(void) { - struct ast_context *con; - /* usage of AGI is optional, so check to see if the ast_agi_register() function is available; if so, use it. */ diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 138b024c23..5043961434 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -1009,8 +1009,8 @@ static void apply_options_full(struct ast_vm_user *retval, struct ast_variable * ast_copy_string(retval->imapuser, tmp->value, sizeof(retval->imapuser)); } else if (!strcasecmp(tmp->name, "imappassword") || !strcasecmp(tmp->name, "imapsecret")) { ast_copy_string(retval->imappassword, tmp->value, sizeof(retval->imappassword)); - } else if (!strcasecmp(tmp->name, "imapvmshareid")) { - ast_copy_string(retval->imapvmshareid, tmp->value, sizeof(retval->imapvmshareid)); + } else if (!strcasecmp(var->name, "imapvmshareid")) { + ast_copy_string(retval->imapvmshareid, var->value, sizeof(retval->imapvmshareid)); #endif } else apply_option(retval, tmp->name, tmp->value);