Coverity Report: Fix issues for error type UNINIT in Core supported modules

(issue ASTERISK-19652)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/1909/
........

Merged revisions 366048 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 366049 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366051 65c4cc65-6c06-0410-ace0-fbb531ad65f3
certified/11.2
Jonathan Rose 13 years ago
parent 6f6af21383
commit d1e7473649

@ -1249,6 +1249,7 @@ static int extenspy_exec(struct ast_channel *chan, const char *data)
}
} else {
/* Coverity - This uninit_use should be ignored since this macro initializes the flags */
ast_clear_flag(&flags, AST_FLAGS_ALL);
}
@ -1293,6 +1294,7 @@ static int dahdiscan_exec(struct ast_channel *chan, const char *data)
int res;
char *mygroup = NULL;
/* Coverity - This uninit_use should be ignored since this macro initializes the flags */
ast_clear_flag(&flags, AST_FLAGS_ALL);
ast_format_clear(&oldwf);
if (!ast_strlen_zero(data)) {

@ -181,8 +181,13 @@ static int disa_exec(struct ast_channel *chan, const char *data)
args.context = "disa";
if (ast_strlen_zero(args.mailbox))
args.mailbox = "";
if (!ast_strlen_zero(args.options))
if (!ast_strlen_zero(args.options)) {
ast_app_parse_options(app_opts, &flags, NULL, args.options);
} else {
/* Coverity - This uninit_use should be ignored since this macro initializes the flags */
ast_clear_flag(&flags, AST_FLAGS_ALL);
}
ast_debug(1, "Mailbox: %s\n",args.mailbox);

@ -197,7 +197,7 @@ AST_APP_OPTIONS(cdr_func_options, {
static int cdr_read(struct ast_channel *chan, const char *cmd, char *parse,
char *buf, size_t len)
{
char *ret;
char *ret = NULL;
struct ast_flags flags = { 0 };
struct ast_cdr *cdr;
AST_DECLARE_APP_ARGS(args,

@ -3606,9 +3606,11 @@ static int feature_interpret(struct ast_channel *chan, struct ast_channel *peer,
struct ast_flags features;
struct ast_call_feature feature;
if (sense == FEATURE_SENSE_CHAN) {
/* Coverity - This uninit_use should be ignored since this macro initializes the flags */
ast_copy_flags(&features, &(config->features_caller), AST_FLAGS_ALL);
}
else {
/* Coverity - This uninit_use should be ignored since this macro initializes the flags */
ast_copy_flags(&features, &(config->features_callee), AST_FLAGS_ALL);
}

Loading…
Cancel
Save