[asterisk-commits] jrose: trunk r366051 - in /trunk: ./ apps/ funcs/ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu May 10 10:57:31 CDT 2012


Author: jrose
Date: Thu May 10 10:57:26 2012
New Revision: 366051

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=366051
Log:
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

Modified:
    trunk/   (props changed)
    trunk/apps/app_chanspy.c
    trunk/apps/app_disa.c
    trunk/funcs/func_cdr.c
    trunk/main/features.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.

Modified: trunk/apps/app_chanspy.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_chanspy.c?view=diff&rev=366051&r1=366050&r2=366051
==============================================================================
--- trunk/apps/app_chanspy.c (original)
+++ trunk/apps/app_chanspy.c Thu May 10 10:57:26 2012
@@ -1249,6 +1249,7 @@
 		}
 
 	} 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 @@
 	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)) {

Modified: trunk/apps/app_disa.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_disa.c?view=diff&rev=366051&r1=366050&r2=366051
==============================================================================
--- trunk/apps/app_disa.c (original)
+++ trunk/apps/app_disa.c Thu May 10 10:57:26 2012
@@ -181,8 +181,13 @@
 		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);
 

Modified: trunk/funcs/func_cdr.c
URL: http://svnview.digium.com/svn/asterisk/trunk/funcs/func_cdr.c?view=diff&rev=366051&r1=366050&r2=366051
==============================================================================
--- trunk/funcs/func_cdr.c (original)
+++ trunk/funcs/func_cdr.c Thu May 10 10:57:26 2012
@@ -197,7 +197,7 @@
 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,

Modified: trunk/main/features.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/features.c?view=diff&rev=366051&r1=366050&r2=366051
==============================================================================
--- trunk/main/features.c (original)
+++ trunk/main/features.c Thu May 10 10:57:26 2012
@@ -3606,9 +3606,11 @@
 	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);
 	}
 




More information about the asterisk-commits mailing list