[Openvas-commits] r11606 - in trunk/openvas-manager: . src

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Sep 13 08:22:05 CEST 2011


Author: mattm
Date: 2011-09-13 08:22:03 +0200 (Tue, 13 Sep 2011)
New Revision: 11606

Modified:
   trunk/openvas-manager/ChangeLog
   trunk/openvas-manager/src/manage_sql.c
Log:
	* src/manage_sql.c (print_report_xml): Reluctantly init run_status.

Modified: trunk/openvas-manager/ChangeLog
===================================================================
--- trunk/openvas-manager/ChangeLog	2011-09-13 05:51:43 UTC (rev 11605)
+++ trunk/openvas-manager/ChangeLog	2011-09-13 06:22:03 UTC (rev 11606)
@@ -1,5 +1,9 @@
 2011-09-13  Matthew Mundell <matthew.mundell at greenbone.net>
 
+	* src/manage_sql.c (print_report_xml): Reluctantly init run_status.
+
+2011-09-13  Matthew Mundell <matthew.mundell at greenbone.net>
+
 	* INSTALL: Typo.
 
 2011-09-08  Matthew Mundell <matthew.mundell at greenbone.net>

Modified: trunk/openvas-manager/src/manage_sql.c
===================================================================
--- trunk/openvas-manager/src/manage_sql.c	2011-09-13 05:51:43 UTC (rev 11605)
+++ trunk/openvas-manager/src/manage_sql.c	2011-09-13 06:22:03 UTC (rev 11606)
@@ -14669,6 +14669,14 @@
 
   /** @todo Leaks on error in PRINT.  The process normally exits then anyway. */
 
+  /* run_status is set by report_scan_run_status when either of "delta" and
+   * "report" are true.  run_status is only used by run_status_name, only when
+   * either of "delta" and "report" are true, and only after a
+   * report_scan_run_status call.  Still GCC 4.4.5 (Debian 4.4.5-8) gives a
+   * "may be used uninitialized" warning, so init it here to quiet the
+   * warning. */
+  run_status = TASK_STATUS_INTERNAL_ERROR;
+
   if ((type == NULL) || (strcmp (type, "scan") == 0))
     {
       type = NULL;



More information about the Openvas-commits mailing list