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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon May 11 12:29:12 CEST 2009


Author: mattm
Date: 2009-05-11 12:29:12 +0200 (Mon, 11 May 2009)
New Revision: 3322

Modified:
   trunk/openvas-manager/ChangeLog
   trunk/openvas-manager/src/manage.c
   trunk/openvas-manager/src/tasks_sql.h
Log:
	Address remaining warnings.

	* src/tasks_sql.h (sql_string): Return signed char.  Cast away signs.
	(append_to_task_string): Make "current" signed.
	(free_task): Remove.

	* src/manage.c (print_tasks): Direct out.


Modified: trunk/openvas-manager/ChangeLog
===================================================================
--- trunk/openvas-manager/ChangeLog	2009-05-11 10:23:33 UTC (rev 3321)
+++ trunk/openvas-manager/ChangeLog	2009-05-11 10:29:12 UTC (rev 3322)
@@ -1,5 +1,15 @@
 2009-05-11  Matthew Mundell <mmundell at intevation.de>
 
+	Address remaining warnings.
+
+	* src/tasks_sql.h (sql_string): Return signed char.  Cast away signs.
+	(append_to_task_string): Make "current" signed.
+	(free_task): Remove.
+
+	* src/manage.c (print_tasks): Direct out.
+
+2009-05-11  Matthew Mundell <mmundell at intevation.de>
+
 	* src/otpd.c (serve_otp): Connect to server initially.
 
 2009-05-11  Matthew Mundell <mmundell at intevation.de>

Modified: trunk/openvas-manager/src/manage.c
===================================================================
--- trunk/openvas-manager/src/manage.c	2009-05-11 10:23:33 UTC (rev 3321)
+++ trunk/openvas-manager/src/manage.c	2009-05-11 10:29:12 UTC (rev 3322)
@@ -455,8 +455,10 @@
 /* Headers of functions in the next page. */
 static int
 delete_reports (task_t);
+#if 0
 static void
 print_tasks ();
+#endif
 
 #ifdef TASKS_FS
 #include "tasks_fs.h"
@@ -467,6 +469,7 @@
 
 /* General task facilities. */
 
+#if 0
 #if TRACE
 /**
  * @brief Print the server tasks.
@@ -500,6 +503,7 @@
     tracef ("   Task array empty or still to be created.\n\n");
 }
 #endif
+#endif
 
 /**
  * @brief Create the current report file for a task.

Modified: trunk/openvas-manager/src/tasks_sql.h
===================================================================
--- trunk/openvas-manager/src/tasks_sql.h	2009-05-11 10:23:33 UTC (rev 3321)
+++ trunk/openvas-manager/src/tasks_sql.h	2009-05-11 10:29:12 UTC (rev 3322)
@@ -169,18 +169,20 @@
   return ret;
 }
 
-unsigned char*
+char*
 sql_string (unsigned int col, unsigned int row, char* sql, ...)
 {
   sqlite3_stmt* stmt;
+  const unsigned char* ret2;
+  char* ret;
   va_list args;
   va_start (args, sql);
   sql_x (col, row, sql, args, &stmt);
   va_end (args);
-  const unsigned char* ret2 = sqlite3_column_text (stmt, col);
+  ret2 = sqlite3_column_text (stmt, col);
   /* TODO: For efficiency, save this duplication by adjusting the task
            interface. */
-  const unsigned char* ret = g_strdup (ret2);
+  ret = g_strdup ((char*) ret2);
   sqlite3_finalize (stmt);
   return ret;
 }
@@ -234,7 +236,7 @@
 void
 append_to_task_string (task_t task, const char* field, const char* value)
 {
-  unsigned char* current;
+  char* current;
   current = sql_string (0, 0,
                         "SELECT %s FROM tasks_%s WHERE ROWID = %llu;",
                         field,
@@ -805,15 +807,6 @@
 /**
  * @brief Dummy function.
  */
-static void
-free_task (task_t task)
-{
-  /* Empty. */
-}
-
-/**
- * @brief Dummy function.
- */
 void
 free_tasks ()
 {



More information about the Openvas-commits mailing list