X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=util.c;h=c8d50f5b5fbc15fbff326efbaa45a40f4f734d49;hp=abc102fe4fd33d861d5859ee8ff5c96501bb9836;hb=ff63e5bd73e012905568db0fcd3a702fc7f32119;hpb=489ad486bcbb04da48715c4f59aa3da8dd5983a6 diff --git a/util.c b/util.c old mode 100755 new mode 100644 index abc102f..c8d50f5 --- a/util.c +++ b/util.c @@ -26,12 +26,12 @@ #include "gmqcc.h" /* TODO: remove globals ... */ -uint64_t mem_ab = 0; -uint64_t mem_db = 0; -uint64_t mem_at = 0; -uint64_t mem_dt = 0; -uint64_t mem_pk = 0; -uint64_t mem_hw = 0; +static uint64_t mem_ab = 0; +static uint64_t mem_db = 0; +static uint64_t mem_at = 0; +static uint64_t mem_dt = 0; +static uint64_t mem_pk = 0; +static uint64_t mem_hw = 0; struct memblock_t { const char *file; @@ -465,8 +465,7 @@ GMQCC_INLINE size_t util_hthash(hash_table_t *ht, const char *key) { const unsigned char *data = (const unsigned char*)key; while (size >= 4) { - alias = *(uint32_t*)data; - + alias = (data[0] | (data[1] << 8) | (data[2] << 16) | (data[3] << 24)); alias *= mix; alias ^= alias >> rot; alias *= mix;