Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 7956d291fb1fbce1e2f42af4fd161f41 > files > 3

openvas-manager-2.0.3-1.fc15.src.rpm

Patch to avoid compile-time errors about variable set but not used
diff -ru openvas-manager-2.0.2/src/manage_sql.c openvas-manager-2.0.2.new/src/manage_sql.c
--- openvas-manager-2.0.2/src/manage_sql.c	2011-03-02 15:21:27.000000000 +0100
+++ openvas-manager-2.0.2.new/src/manage_sql.c	2011-03-28 18:29:52.000000000 +0200
@@ -12005,12 +12005,15 @@
   {
     iterator_t formats;
     const char *uuid_format;
+    /* variable set but not used 
     char *uuid_report;
+    */
     gchar *script, *script_dir;
 
     /* Setup file names. */
 
-    uuid_report = report_uuid (report);
+    //uuid_report = report_uuid (report);
+    report_uuid (report);
     init_report_format_iterator (&formats, report_format, 1, NULL);
     if (next (&formats) == FALSE)
       {
@@ -12271,12 +12274,15 @@
   {
     iterator_t formats;
     const char *uuid_format;
+    /* variable set but not used
     char *uuid_report;
+    */
     gchar *script, *script_dir;
 
     /* Setup file names. */
 
-    uuid_report = report_uuid (report);
+    //uuid_report = report_uuid (report);
+    report_uuid (report);
     init_report_format_iterator (&formats, report_format, 1, NULL);
     if (next (&formats) == FALSE)
       {
@@ -20953,6 +20959,8 @@
   same_second = (broken1.tm_sec == broken2->tm_sec);
 
   year1_less = (broken1.tm_year < broken2->tm_year);
+  /* avoid compile-time error as variable year1_less is set but never used */
+  (void) year1_less;
   month1_less = (broken1.tm_mon < broken2->tm_mon);
   day1_less = (broken1.tm_mday < broken2->tm_mday);
   hour1_less = (broken1.tm_hour < broken2->tm_hour);