Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / mini / cfgdump.c
index 7b9cfd320ab60e682c2356632b61a48507850c7a..36c9ffac877b0a822328e5f09df25603dfddc2a4 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright (C) 2016 Xamarin Inc
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
@@ -21,7 +22,6 @@
 #include <unistd.h>
 #include <errno.h>
 #include <arpa/inet.h>
-#include <errno.h>
 
 #if 0
 #define CFG_DEBUG
@@ -401,9 +401,9 @@ instruction_hash (MonoInst *insn)
        res ^= insn->sreg1  << 0x10;
        res ^= insn->sreg2  << 0x14;
        res ^= insn->sreg3  << 0x18;
-       res ^= (guint) insn->next;
-       res ^= (guint) insn->prev;
-       res ^= (guint) insn;
+       res ^= (gsize) insn->next;
+       res ^= (gsize) insn->prev;
+       res ^= (gsize) insn;
        return res;
 }
 
@@ -438,15 +438,15 @@ constant_pool_hash (ConstantPoolEntry *entry)
                        return instruction_hash ((MonoInst *) entry->data);
                case PT_SIGNATURE: {
                        MonoMethodSignature *sig = (MonoMethodSignature *) entry->data;
-                       guint ret = (guint) sig->ret;
+                       guint ret = GPOINTER_TO_UINT (sig->ret);
                        for (int i = 0; i < sig->param_count; i++) {
-                               ret ^= (guint) sig->params [i] << (i + 1);
+                               ret ^= GPOINTER_TO_UINT (sig->params [i]) << (i + 1);
                        }
                        return ret;
                }
                case PT_INPUTTYPE: // TODO: singleton.
                case PT_ENUMKLASS:
-                       return (guint) entry->data;
+                       return GPOINTER_TO_UINT (entry->data);
        }
        g_assert (FALSE);
        return FALSE;