fix warnings
[libfirm] / ir / ana / irsimpletype.c
index a1d8426..87ad75f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyrigth (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
  *
  * This file is part of libFirm.
  *
@@ -43,6 +43,7 @@
 #include "irgwalk.h"
 #include "ident.h"
 #include "trouts.h"
+#include "error.h"
 
 #define VERBOSE_UNKNOWN_TYPE(s) printf s
 
@@ -122,7 +123,7 @@ static ir_type *find_type_for_Proj(ir_node *n) {
       ir_type *mtp = get_Call_type(pred_pred);
       tp = get_method_res_type(mtp, get_Proj_proj(n));
     } else if (get_irn_op(pred_pred) == op_Tuple) {
-      assert(0 && "Encountered nested Tuple");
+      panic("Encountered nested Tuple");
     } else {
       VERBOSE_UNKNOWN_TYPE(("Proj %ld from Proj from ??: unknown type\n", get_irn_node_nr(n)));
       tp = firm_unknown_type;
@@ -396,12 +397,10 @@ default_code: {
       break;
     }
 
-    printf(" not implemented: "); DDMN(n);
+    panic(" not implemented: %+F", n);
   } break; /* default */
   } /* end switch */
 
-  /* printf (" found %s ", get_type_name(tp)); DDM; */
-
   return tp;
 }
 
@@ -414,8 +413,6 @@ static ir_type *compute_irn_type(ir_node *n) {
     set_irn_typeinfo_type(n, tp);
   }
 
-  /* printf (" found %s ", get_type_name(tp)); DDM; */
-
   return tp;
 }
 
@@ -428,6 +425,7 @@ static ir_type *compute_irn_type(ir_node *n) {
 static void compute_type(ir_node *n, void *env) {
 
   ir_type *tp = get_irn_typeinfo_type(n);
+  (void) env;
   if (tp ==  phi_cycle_type) {
     /* printf(" recomputing for phi_cycle_type "); DDMN(n); */
     set_irn_typeinfo_type(n, initial_type);