Add the return type as parameter to the macros set_find() and set_insert().
[libfirm] / ir / adt / iterator.c
index 0038f96..bd31240 100644 (file)
@@ -1,6 +1,28 @@
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
+/*
+ * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
+ *
+ * This file is part of libFirm.
+ *
+ * This file may be distributed and/or modified under the terms of the
+ * GNU General Public License version 2 as published by the Free Software
+ * Foundation and appearing in the file LICENSE.GPL included in the
+ * packaging of this file.
+ *
+ * Licensees holding valid libFirm Professional Edition licenses may use
+ * this file in accordance with the libFirm Commercial License.
+ * Agreement provided with the Software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+/**
+ * @file
+ * @brief   iterators
+ * @author  Sebastian Hack
+ */
+#include "config.h"
 
 #include <string.h>
 
 
 static void *it_pset_start(void *collection)
 {
-       return pset_first(collection);
+       return pset_first((pset*) collection);
 }
 
 static void *it_pset_next(void *collection, void *curr)
 {
-       return pset_next(collection);
+       (void) curr;
+       return pset_next((pset*) collection);
 }
 
 static void it_pset_finish(void *collection, void *curr)
 {
+       (void) collection;
+       (void) curr;
 }
 
 static const iterator_t iterator_pset = {
@@ -35,8 +60,8 @@ const iterator_t *pset_iterator = &iterator_pset;
 
 static void *it_list_next(void *coll, void *it)
 {
-       struct list_head *head = coll;
-       struct list_head *curr = it;
+       struct list_head *head = (list_head*) coll;
+       struct list_head *curr = (list_head*) it;
        return curr->next != head ? curr->next : NULL;
 }
 
@@ -47,6 +72,8 @@ static void *it_list_start(void *coll)
 
 static void it_list_finish(void *coll, void *curr)
 {
+       (void) coll;
+       (void) curr;
 }
 
 static const iterator_t iterator_list = {