]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Coverity Report: Fix issues for error type UNINIT in Core supported modules
authorJonathan Rose <jrose@digium.com>
Thu, 10 May 2012 15:57:26 +0000 (15:57 +0000)
committerJonathan Rose <jrose@digium.com>
Thu, 10 May 2012 15:57:26 +0000 (15:57 +0000)
(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

apps/app_chanspy.c
apps/app_disa.c
funcs/func_cdr.c
main/features.c

index 07cc3d666170a0fe95acc2ebc5b56296f893c92c..bf7b8941632c17c13d0978707cd59455f3e35d4b 100644 (file)
@@ -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)) {
index b38da76542d077dfa071a15781c44a2ea0634fd7..c43370c95ee3717885f74822fe2f2b1b9951f022 100644 (file)
@@ -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);
 
index ff57cdedd9e342cd766057d1d3da9596ba374788..adb42742b628fe99db9080c6dd591e8c31119a66 100644 (file)
@@ -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,
index c5caff4718778be4c2e05abd1b71a64b708e6f9e..c9ea91ac52166ad9b78402e0696182167288d40a 100644 (file)
@@ -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);
        }