Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / mini / dominators.c
index b9437db9be4aea35c456101921a911d5c6529e29..208ae7597a00e73eefabd1719534c6aaef1b7088 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * dominators.c: Dominator computation on the control flow graph
+/**
+ * \file
+ * Dominator computation on the control flow graph
  *
  * Author:
  *   Dietmar Maurer (dietmar@ximian.com)
@@ -7,6 +8,7 @@
  *
  * (C) 2003 Ximian, Inc.
  * Copyright 2011 Xamarin, Inc (http://www.xamarin.com)
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
 #include <string.h>
 #include <mono/metadata/debug-helpers.h>
@@ -117,7 +119,7 @@ compute_dominators (MonoCompile *cfg)
                MonoBitSet *dominators;
                char *mem;
 
-               mem = mono_mempool_alloc0 (cfg->mempool, bitsize);
+               mem = (char *)mono_mempool_alloc0 (cfg->mempool, bitsize);
 
                bb->dominators = dominators = mono_bitset_mem_new (mem, cfg->num_bblocks, 0);
                mem += bitsize;
@@ -199,7 +201,7 @@ compute_dominance_frontier (MonoCompile *cfg)
                cfg->bblocks [i]->flags &= ~BB_VISITED;
 
        bitsize = mono_bitset_alloc_size (cfg->num_bblocks, 0);
-       mem = mono_mempool_alloc0 (cfg->mempool, bitsize * cfg->num_bblocks);
+       mem = (char *)mono_mempool_alloc0 (cfg->mempool, bitsize * cfg->num_bblocks);
  
        for (i = 0; i < cfg->num_bblocks; ++i) {
                MonoBasicBlock *bb = cfg->bblocks [i];
@@ -332,7 +334,7 @@ mono_compute_natural_loops (MonoCompile *cfg)
                                        GList *l;
 
                                        for (l = h->loop_blocks; l; l = l->next) {
-                                               MonoBasicBlock *b = l->data;
+                                               MonoBasicBlock *b = (MonoBasicBlock *)l->data;
                                                if (b->dfn)
                                                        mono_bitset_set_fast (in_loop_blocks, b->dfn);
                                        }