Remove the unused attribute const arch_env_t *arch_env from struct dump_env and also...
[libfirm] / ir / ana / phiclass.c
index 4b5397d..ac68a80 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (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.
  *
@@ -64,8 +64,9 @@ static INLINE void _set_phi_class(ir_phase *ph, ir_node *irn, ir_node ***cls) {
 }
 
 /* initialize data structure for given irn in given phase */
-static void *irn_phi_class_init(ir_phase *ph, ir_node *irn, void *data) {
+static void *irn_phi_class_init(ir_phase *ph, const ir_node *irn, void *data) {
        irn_phi_class_t *ipc = data ? data : phase_alloc(ph, sizeof(ipc[0]));
+       (void) irn;
        memset(ipc, 0, sizeof(ipc[0]));
        return ipc;
 }
@@ -216,7 +217,7 @@ pset *get_all_phi_classes(phi_classes_t *pc) {
  * @return The Phi class object for the @p irg.
  */
 phi_classes_t *phi_class_new_from_irg(ir_graph *irg, int pure_phi_classes) {
-       phi_classes_t *res = xmalloc(sizeof(*res));
+       phi_classes_t *res = XMALLOC(phi_classes_t);
 
        FIRM_DBG_REGISTER(res->dbg, "ir.ana.phiclass");
        phase_init(&res->ph, "phi_classes", irg, PHASE_DEFAULT_GROWTH, irn_phi_class_init, NULL);
@@ -235,7 +236,7 @@ phi_classes_t *phi_class_new_from_irg(ir_graph *irg, int pure_phi_classes) {
  * @return The Phis class object for @p all_phis.
  */
 phi_classes_t *phi_class_new_from_set(ir_graph *irg, ir_nodeset_t *all_phis, int pure_phi_classes) {
-       phi_classes_t *res = xmalloc(sizeof(*res));
+       phi_classes_t *res = XMALLOC(phi_classes_t);
 
        FIRM_DBG_REGISTER(res->dbg, "ir.ana.phiclass");
        phase_init(&res->ph, "phi_classes", irg, PHASE_DEFAULT_GROWTH, irn_phi_class_init, NULL);