fixed some compiler warnings
authorMartin Willi <martin@strongswan.org>
Mon, 27 Oct 2008 11:13:33 +0000 (11:13 -0000)
committerMartin Willi <martin@strongswan.org>
Mon, 27 Oct 2008 11:13:33 +0000 (11:13 -0000)
src/charon/bus/listeners/file_logger.c
src/charon/config/traffic_selector.c
src/charon/plugins/stroke/stroke_config.c
src/charon/plugins/updown/updown_plugin.c
src/charon/sa/task_manager.c
src/dumm/mconsole.c

index 82d5c27..9ce8397 100644 (file)
@@ -106,7 +106,6 @@ static void destroy(private_file_logger_t *this)
  */
 file_logger_t *file_logger_create(FILE *out)
 {
-       debug_t group;
        private_file_logger_t *this = malloc_thing(private_file_logger_t);
        
        /* public functions */
index b94003c..b879047 100644 (file)
@@ -612,6 +612,11 @@ static void to_subnet(private_traffic_selector_t *this, host_t **net, u_int8_t *
                        net_chunk.len = sizeof(this->from6);
                        break;
                }
+               default:
+               {
+                       /* unreachable */
+                       return;
+               }
        }
        
        net_chunk.ptr = malloc(net_chunk.len);
index f10fe20..d339f26 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <daemon.h>
 #include <utils/mutex.h>
+#include <utils/lexparser.h>
 
 typedef struct private_stroke_config_t private_stroke_config_t;
 
index 0e054ca..a0c39e3 100644 (file)
@@ -15,6 +15,9 @@
  * $Id$
  */
 
+#define _GNU_SOURCE
+#include <stdio.h>
+
 #include "updown_plugin.h"
 
 #include <daemon.h>
index 02cb62c..4006a8c 100644 (file)
@@ -145,8 +145,6 @@ struct private_task_manager_t {
  */
 static void flush(private_task_manager_t *this)
 {
-       task_t *task;
-       
        this->queued_tasks->destroy_offset(this->queued_tasks, 
                                                                                offsetof(task_t, destroy));
        this->passive_tasks->destroy_offset(this->passive_tasks,
index 85c090e..f071ad4 100644 (file)
@@ -207,7 +207,7 @@ static int exec(private_mconsole_t *this, void(*cb)(void*,char*,size_t),
 /**
  * Poll until guest is ready
  */
-static bool wait_bootup(private_mconsole_t *this)
+static void wait_bootup(private_mconsole_t *this)
 {
        /* wait for init process to appear */
        while (request(this, ignore, NULL, "exec ps -p 1 > /dev/null"))
@@ -346,11 +346,7 @@ mconsole_t *mconsole_create(char *notify, void(*idle)(void))
        }
        unlink(notify);
        
-       if (!wait_bootup(this))
-       {
-               destroy(this);
-               return NULL;
-       }
+       wait_bootup(this);
        
        return &this->public;
 }