--- a/AreaFilter.c
+++ b/AreaFilter.c
@@ -83,8 +83,8 @@
 	
 	int n;
 	for (n = 0 ; n < ArrayList_Count(orderedPoints) ; ++n) {
-		FilterPoint* p0 = ArrayList_GetItem(orderedPoints,n);
-		FilterPoint* p1 = ArrayList_GetItem(orderedPoints, (n + 1) % ArrayList_Count(orderedPoints));
+		FilterPoint* p0 = (FilterPoint*) ArrayList_GetItem(orderedPoints,n);
+		FilterPoint* p1 = (FilterPoint*) ArrayList_GetItem(orderedPoints, (n + 1) % ArrayList_Count(orderedPoints));
 		
 		A += p0->x * p1->y - p1->x * p0->y;
 	}
@@ -145,7 +145,7 @@
 int AreaFilter_MakeChain (AreaFilter* self, ArrayList* points, int (*comp)(const FilterPoint*, const FilterPoint*))
 {
 	IComparator comparator;
-	comparator.compareTo = (void*)comp;
+	comparator.compareTo = (int ( *)(IComparator *,const void *,const void *)) comp;
 	ArrayList_Sort(points, &comparator);
 	
 	int s = 1;
@@ -159,7 +159,7 @@
 		s = j + 1;
 		
 		// Swap
-		FilterPoint* t = ArrayList_GetItem(points, s);
+		FilterPoint* t = (FilterPoint*) ArrayList_GetItem(points, s);
 		ArrayList_SetItem(points, s, ArrayList_GetItem(points, i));
 		ArrayList_SetItem(points, i, t);
 	}